Skip to content

Instantly share code, notes, and snippets.

@berdario
Created August 11, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save berdario/809fc01c1b1f391e0ecd to your computer and use it in GitHub Desktop.
Save berdario/809fc01c1b1f391e0ecd to your computer and use it in GitHub Desktop.
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs #-}
module Models where
import Database.Persist.Sqlite (runSqlite)
-- without the explicit type signature, it fails
-- with an ambiguous Control.Monad.IO.Class.MonadIO instance
-- connectionString :: Text
connectionString = ":memory:"
runDb query = runSqlite connectionString query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment