Safe Haskell | None |
---|---|
Language | Haskell98 |
- data a :*: b = !a :*: !b
- class IsProdList p where
- isProdList :: p -> Bool
- class IsProdList t => Select n t where
- class IsProdList t => Discard n t where
- data Keep = Keep
- data Drop = Drop
- class (IsProdList m, IsProdList t) => Mask m t where
Product type
Strict product type, written infix.
!a :*: !b infixr 9 |
class IsProdList p where Source
isProdList :: p -> Bool Source
Check if a sequence of products forms a valid list, using () for the nil value.
isProdList (1 :*: 4 :*: 5) ... no instance isProdList (1 :*: 4 :*: ()) = True
IsProdList () Source | |
IsProdList fs => IsProdList ((:*:) f fs) Source |
Selecting
class IsProdList t => Select n t where Source
Discarding
class IsProdList t => Discard n t where Source
Singleton to indicate a field that should be kept.
Singleton to indicate a field that should be dropped.
Masking
class (IsProdList m, IsProdList t) => Mask m t where Source
Class of data types that can have parts masked out.