diff --git a/sequelize.cabal b/sequelize.cabal index d289bd8..3a02ff6 100644 --- a/sequelize.cabal +++ b/sequelize.cabal @@ -68,6 +68,7 @@ library , text , unordered-containers , vector + , ghc-prim default-language: Haskell2010 test-suite sequelize-test diff --git a/src/Sequelize.hs b/src/Sequelize.hs index 25bd571..35b6924 100644 --- a/src/Sequelize.hs +++ b/src/Sequelize.hs @@ -68,6 +68,7 @@ import qualified Database.Beam.Query.Internal as B import qualified Database.Beam.Schema.Tables as B import GHC.Generics (Generic) import qualified GHC.Generics as G +import GHC.Types (Type) import GHC.TypeLits (Symbol) import Named ((:!), (:?), arg, argF) @@ -98,7 +99,7 @@ isClausesToWhere = fmap (\(IS c v) -> Is c (Eq v)) data IS be table where IS :: (ToJSON value, Ord value, EqValue be value, Show value) => Column table value -> value -> IS be table -data Clause be (table :: (* -> *) -> *) where +data Clause be (table :: (Type -> Type) -> Type) where And :: [Clause be table] -> Clause be table Or :: [Clause be table] -> Clause be table Is :: @@ -254,7 +255,7 @@ instance where getTableField = L.getField @name -class GModelToSets be (table :: (* -> *) -> *) g where +class GModelToSets be (table :: (Type -> Type) -> Type) g where gModelToSets :: g x -> [Set be table] instance @@ -573,4 +574,4 @@ fromColumnar' :: B.Columnar' f value -> B.Columnar f value fromColumnar' (B.Columnar' x) = x retypeQOrd :: B.QOrd be s a -> B.QOrd be s b -retypeQOrd (B.QOrd x) = B.QOrd x \ No newline at end of file +retypeQOrd (B.QOrd x) = B.QOrd x