Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
bd9586148c Make simple yesod project 2020-11-25 14:55:11 +01:00
4 changed files with 26 additions and 6 deletions

View file

@ -1,6 +1,10 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
module Main where
import Props
import Yesod
main :: IO ()
main = putStrLn helloWorld
main = warp 3000 App

View file

@ -13,6 +13,7 @@ extra-doc-files:
dependencies:
- base >= 4.7 && < 5
- yesod
library:
source-dirs: src

View file

@ -1,10 +1,8 @@
cabal-version: 1.18
-- This file has been generated from package.yaml by hpack version 0.33.0.
-- This file has been generated from package.yaml by hpack version 0.34.2.
--
-- see: https://github.com/sol/hpack
--
-- hash: 057a536ac3d0fd40b3122084eee53201158527bbcd0dbac7cec33d8fd06cf208
name: props
version: 0.1.0.0
@ -29,6 +27,7 @@ library
src
build-depends:
base >=4.7 && <5
, yesod
default-language: Haskell2010
executable props
@ -41,4 +40,5 @@ executable props
build-depends:
base >=4.7 && <5
, props
, yesod
default-language: Haskell2010

View file

@ -1,4 +1,19 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Props where
helloWorld :: String
helloWorld = "Hello World!"
import Yesod
data App = App
mkYesod "App" [parseRoutes|
/ HomeR GET
|]
instance Yesod App
getHomeR :: Handler Html
getHomeR = defaultLayout [whamlet|Hello World!|]