Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
type family NatSymbol n where ... Source #
NatSymbol 0 = "0" | |
NatSymbol 1 = "1" | |
NatSymbol 2 = "2" | |
NatSymbol 3 = "3" | |
NatSymbol 4 = "4" | |
NatSymbol 5 = "5" | |
NatSymbol 6 = "6" | |
NatSymbol 7 = "7" | |
NatSymbol 8 = "8" | |
NatSymbol 9 = "9" | |
NatSymbol 10 = "10" | |
NatSymbol 11 = "11" | |
NatSymbol 12 = "12" | |
NatSymbol 13 = "13" | |
NatSymbol 14 = "14" | |
NatSymbol 15 = "15" | |
NatSymbol 16 = "16" | |
NatSymbol 17 = "17" | |
NatSymbol 18 = "18" | |
NatSymbol 19 = "19" | |
NatSymbol _ = TypeError ('Text "Constructors with more than 20 fields not supported") |
type family AdtNs ass cons where ... Source #
AdtNs '[] '[] = '[] | |
AdtNs (_ ': ass) ('Record conName fs ': cons) = '(conName, 'True, ConNs fs) ': AdtNs ass cons | |
AdtNs (as ': ass) ('Constructor conName ': cons) = '(conName, 'False, ConNsEnum conName 0 as) ': AdtNs ass cons | |
AdtNs _ ('Infix conName _ _ ': _) = TypeError ("Infix constructor not supported: " <> conName) |
type family SumConNames a where ... Source #
SumConNames a = Ns (GCode a) (GDatatypeInfoOf a) |
type family ProdNames' a names :: [Symbol] where ... Source #
ProdNames' _ '['(_, _, names)] = names | |
ProdNames' a '[] = TypeError ("Tried using empty type as a product: " <> a) | |
ProdNames' a _ = TypeError ("Tried using sum type as a product: " <> a) |
type family ProdNames (a :: Type) :: [Symbol] where ... Source #
ProdNames a = ProdNames' a (Ns (GCode a) (GDatatypeInfoOf a)) |