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 #-}
module Main where
import Database.SQLite.Simple
import Web.Spock.Safe hiding (head)
import qualified Database.SQLite.Simple as Db
import qualified Web.Spock.Safe as S hiding (head)
import Within.DBMemorial.Post
main :: IO ()
main = do
conn <- open "../db/posts.db"
conn <- Db.open "../db/posts.db"
-- 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
-- Set up the URL router
runSpock 5000 $ spockT id $ do
get root $
text $ postBody h
S.runSpock 5000 $ S.spockT id $ do
S.get S.root $
S.text $ postBody h