From 5a14a1849ab50ec8900a00ff5055e308b3261637 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Mon, 27 Jul 2015 23:12:13 -0700 Subject: [PATCH] Use Text instead of String --- web/src/Main.hs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/web/src/Main.hs b/web/src/Main.hs index bea14e4..3b323bb 100644 --- a/web/src/Main.hs +++ b/web/src/Main.hs @@ -9,12 +9,12 @@ import Database.SQLite.Simple.FromRow import Web.Spock.Safe hiding (head) data Post = Post { - postID :: Int - , postOID :: String - , postBody :: String - , postMarkdown :: String - , postAuthor :: String - , postPage :: Int + postID :: Int + , postOID :: Text + , postBody :: Text + , postMarkdown :: Text + , postAuthor :: Text + , postPage :: Int } deriving (Show, Eq) instance FromRow Post where @@ -31,6 +31,4 @@ main = do -- Set up the URL router runSpock 5000 $ spockT id $ do get root $ - text $ pack $ postBody h - get ("hello" var) $ \name -> - text ("Hello " <> name <> "!") + text $ postBody h