remove some stuff

This commit is contained in:
Eitan Chatav 2018-07-07 11:59:50 -07:00
parent 961be6764e
commit 5b05c09958

View File

@ -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