Skip to content

Commit

Permalink
fix(StarIsType deprecation): handles StarIsType extension deprecation
Browse files Browse the repository at this point in the history
* "StarIsType" extesion, which allows naming GHC.Types.Type as a "*"
  will soon be deprecated

* Handles the deprecation across the codebase by explictly using
  GHC.Types.Type instead

* Adds `ghc-prim` as a cabal build dependency to use GHC.Types.Type
  • Loading branch information
arjunkathuria committed Aug 30, 2023
1 parent 1456de6 commit 16d2d3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions sequelize.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ library
, text
, unordered-containers
, vector
, ghc-prim
default-language: Haskell2010

test-suite sequelize-test
Expand Down
7 changes: 4 additions & 3 deletions src/Sequelize.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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 ::
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
retypeQOrd (B.QOrd x) = B.QOrd x

0 comments on commit 16d2d3c

Please sign in to comment.