| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
SizedGrid
Contents
Rexported for generics-sop
class (AllF k f xs, SListI k xs) => All k (f :: k -> Constraint) (xs :: [k]) #
Require a constraint for every element of a list.
If you have a datatype that is indexed over a type-level
list, then you can use All to indicate that all elements
of that type-level list must satisfy a given constraint.
Example: The constraint
All Eq '[ Int, Bool, Char ]
is equivalent to the constraint
(Eq Int, Eq Bool, Eq Char)
Example: A type signature such as
f :: All Eq xs => NP I xs -> ...
means that f can assume that all elements of the n-ary
product satisfy Eq.
Implicit singleton list.
A singleton list can be used to reveal the structure of a type-level list argument that the function is quantified over.
The class SListI should have instances that match the
constructors of SList.
Since: 0.2
Minimal complete definition
class f (g x) => Compose k k1 (f :: k -> Constraint) (g :: k1 -> k) (x :: k1) infixr 9 #
Composition of constraints.
Note that the result of the composition must be a constraint,
and therefore, in f , the kind of :. gf is k -> .
The kind of Constraintg, however, is l -> k and can thus be an normal
type constructor.
A typical use case is in connection with All on an NP or an
NS. For example, in order to denote that all elements on an
satisfy NP f xsShow, we can say .All (Show :. f) xs
Since: 0.2
Instances
| f (g x) => Compose k2 k1 f g x | |
The identity type functor.
Like Identity, but with a shorter name.
Constructors
| I a |
Instances
| Monad I | |
| Functor I | |
| Applicative I | |
| Foldable I | |
| Traversable I | |
| Eq1 I | Since: 0.2.4.0 |
| Ord1 I | Since: 0.2.4.0 |
| Read1 I | Since: 0.2.4.0 |
| Show1 I | Since: 0.2.4.0 |
| NFData1 I | Since: 0.2.5.0 |
| Eq a => Eq (I a) | |
| Ord a => Ord (I a) | |
| Read a => Read (I a) | |
| Show a => Show (I a) | |
| Generic (I a) | |
| NFData a => NFData (I a) | Since: 0.2.5.0 |
| type Rep (I a) | |
| type Code (I a) | |
| type DatatypeInfoOf (I a) | |