Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
type NoGenericError a = (((("The type " <> QuotedType a) <> " does not have an instance of ") <> Quoted "Generic") <> ".") % ("You can add it like this:" % (Quoted "newtype MyType = MyType Text deriving Generic" % (((("If you want to use " <> Quoted "Coercible") <> " instead, use ") <> Quoted "primCoerce") <> "."))) Source #
type NotNewtypeError a = ("The type " <> QuotedType a) <> " is not a newtype." Source #
class UN_CheckNewtype err ass info a w | ass info a -> w where Source #
un_checkNewtype_unwrap :: a -> w Source #
un_checkNewtype_wrap :: w -> a Source #
Instances
UN_CheckNewtype err '['[w]] ('Newtype mn dn ci) a w Source # | |
Defined in Sqel.SOP.Newtype un_checkNewtype_unwrap :: a -> w Source # un_checkNewtype_wrap :: w -> a Source # |
class UN_CheckGeneric errHead err ass info a w | ass info a -> w where Source #
un_checkGeneric_unwrap :: a -> w Source #
un_checkGeneric_wrap :: w -> a Source #
Instances
(err ~ (DelayError (errHead % NotNewtypeError a) :: Void), UN_CheckNewtype err ('[] :: [[Type]]) info a w) => UN_CheckGeneric errHead genErr ('[] :: [[Type]]) info a w Source # | |
Defined in Sqel.SOP.Newtype un_checkGeneric_unwrap :: a -> w Source # un_checkGeneric_wrap :: w -> a Source # | |
(err ~ (DelayError (errHead % NotNewtypeError a) :: Void), UN_CheckNewtype err (x ': xs) info a w) => UN_CheckGeneric errHead genErr (x ': xs) info a w Source # | |
Defined in Sqel.SOP.Newtype un_checkGeneric_unwrap :: a -> w Source # un_checkGeneric_wrap :: w -> a Source # |
class UnwrapNewtype errHead a w | a -> w where Source #
unwrapNewtype :: a -> w Source #
wrapNewtype :: w -> a Source #
Instances
(HasGeneric a flag, err ~ (DelayError (errHead % NoGenericError a) :: Void), UN_CheckGeneric errHead err (GCode a) (GDatatypeInfoOf a) a w) => UnwrapNewtype errHead a w Source # | |
Defined in Sqel.SOP.Newtype unwrapNewtype :: a -> w Source # wrapNewtype :: w -> a Source # |