Commit c0a76b9b authored by MrMan's avatar MrMan

Add some comments to the types

parent 6b385bdc
......@@ -276,13 +276,16 @@ newtype SQLValueGetters entity = SQLVG { getValueGetters :: [entity -> SQLData]
-- ex. data T f = T { name :: f DT.Text }, where f might be a type like `Maybe a` or `Identity a`
type FBounded = (Type -> Type) -> Type
-- | Kind (w/ help of DataKinds) that is used to parametrize over the storage paradigm of an EntityStore
data DBParadigm = SQL
| DocumentStore
deriving (Eq, Show, Read)
-- | Types that are insertable under some database paradigm p
class Insertable (p :: DBParadigm) entity where
getInsertInfo :: EntityInsertInfo p entity
-- | Insertion information for some type that is insertable under database paradigm p
data EntityInsertInfo (p :: DBParadigm) entity where
SQLEII :: TableName -> SQLColumnNames -> SQLValueGetters entity -> EntityInsertInfo 'SQL entity
DocumentStoreEII :: TableName -> EntityInsertInfo 'DocumentStore entity
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment