make the types more explicit

This commit is contained in:
Christine Dodrill 2015-07-27 23:29:29 -07:00
parent b6ca8364a4
commit 4b3aa612e3
1 changed files with 7 additions and 7 deletions

View File

@ -1,19 +1,19 @@
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
module Main where module Main where
import Database.SQLite.Simple import qualified Database.SQLite.Simple as Db
import Web.Spock.Safe hiding (head) import qualified Web.Spock.Safe as S hiding (head)
import Within.DBMemorial.Post import Within.DBMemorial.Post
main :: IO () main :: IO ()
main = do main = do
conn <- open "../db/posts.db" conn <- Db.open "../db/posts.db"
-- Simple tests to prove we're reading from SQLite -- Simple tests to prove we're reading from SQLite
r <- query_ conn "SELECT * FROM Posts WHERE page=1" :: IO [Post] r <- Db.query_ conn "SELECT * FROM Posts WHERE page=1" :: IO [Post]
let h = head r let h = head r
-- Set up the URL router -- Set up the URL router
runSpock 5000 $ spockT id $ do S.runSpock 5000 $ S.spockT id $ do
get root $ S.get S.root $
text $ postBody h S.text $ postBody h