Created
February 14, 2018 20:53
-
-
Save saevarb/777b07cca49a1b5298c227d01f095643 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
import Data.Proxy | |
data UTCTime | |
data ID a | |
data GenTable a | |
data Connection | |
-- class DbSerializable a where | |
-- type RowType a | |
-- table :: GenTable a | |
class Repository entity where | |
type NewEntity entity | |
type RowType entity | |
makeNewRow :: Proxy entity -> NewEntity entity -> UTCTime -> RowType entity | |
makeRow :: entity -> UTCTime -> RowType entity | |
litteral :: entity -> RowType entity | |
idPredicate :: (ID entity) -> RowType entity -> Bool | |
table :: GenTable entity | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment