mirror of
https://github.com/ilyakooo0/squeal.git
synced 2024-09-11 13:57:29 +03:00
remove some stuff
This commit is contained in:
parent
961be6764e
commit
5b05c09958
@ -846,19 +846,11 @@ type family FieldTypeOf (maybe :: Type) where
|
||||
FieldTypeOf ty = TypeError
|
||||
('Text "FieldTypeOf error: non-Maybe type " ':<>: 'ShowType ty)
|
||||
|
||||
type family NullityTypeOf (hask :: Type) where
|
||||
NullityTypeOf (Maybe hask) = 'Null (PG hask)
|
||||
NullityTypeOf hask = 'NotNull (PG hask)
|
||||
|
||||
-- | Calculate the types of fields.
|
||||
type family FieldTypesOf (fields :: [Type]) where
|
||||
FieldTypesOf '[] = '[]
|
||||
FieldTypesOf (field ': fields) = FieldTypeOf field ': FieldTypesOf fields
|
||||
|
||||
type family NullityTypesOf (hasks :: [Type]) where
|
||||
NullityTypesOf '[] = '[]
|
||||
NullityTypesOf (hask ': hasks) = NullityTypeOf hask ': NullityTypesOf hasks
|
||||
|
||||
-- | Inspect the code of an algebraic datatype and ensure it's a product,
|
||||
-- otherwise generate a type error
|
||||
type family RecordCodeOf (hask :: Type) (code ::[[Type]]) :: [Type] where
|
||||
|
Loading…
Reference in New Issue
Block a user