Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type DatabaseResponse a = Either SQLiteResponse a
- runDBAction :: IO a -> IO (DatabaseResponse a)
Documentation
type DatabaseResponse a = Either SQLiteResponse a Source #
Type synonym for what is returned by runDBAction. Either a SQLiteResponse or another type.
runDBAction :: IO a -> IO (DatabaseResponse a) Source #
runDBAction accepts an IO action to perform some database logic using sqlite-simple. We capture any errors that are returned and wrap them in our SQLiteResponse type. If any other type of exception is raised, it is rethrown.