Copyright | (C) 2017-18 Jakub Daniel |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Jakub Daniel <jakub.daniel@protonmail.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
- data Sort
- = BooleanSort
- | IntegralSort
- | ArraySort { }
- data family Sing k (a :: k) :: *
- data DynamicSort where
- DynamicSort :: forall (s :: Sort). Sing s -> DynamicSort
- data DynamicallySorted (f :: (Sort -> *) -> Sort -> *) where
- DynamicallySorted :: forall (s :: Sort) f. Sing s -> IFix f s -> DynamicallySorted f
- parseSort :: Parser DynamicSort
- toStaticSort :: forall (s :: Sort). SingI s => DynamicSort -> Maybe (Sing s)
- toStaticallySorted :: forall f (s :: Sort). SingI s => DynamicallySorted f -> Maybe (IFix f s)
Documentation
A universe of recognized sorts
BooleanSort | booleans (true, false) |
IntegralSort | integers (..., -1, 0, 1, ...) |
ArraySort | arrays indexed by |
data family Sing k (a :: k) :: * #
The singleton kind-indexed data family.
data Sing Bool | |
data Sing Ordering | |
data Sing Nat | |
data Sing Symbol | |
data Sing () | |
data Sing Sort # | |
data Sing [a] | |
data Sing (Maybe a) | |
data Sing (NonEmpty a) | |
data Sing (Either a b) | |
data Sing (a, b) | |
data Sing ((~>) k1 k2) | |
data Sing (a, b, c) | |
data Sing (a, b, c, d) | |
data Sing (a, b, c, d, e) | |
data Sing (a, b, c, d, e, f) | |
data Sing (a, b, c, d, e, f, g) | |
data DynamicSort where Source #
Some sort (obtained for example during parsing)
DynamicSort :: forall (s :: Sort). Sing s -> DynamicSort |
data DynamicallySorted (f :: (Sort -> *) -> Sort -> *) where Source #
An expression of some sort (obtained for example during parsing)
DynamicallySorted :: forall (s :: Sort) f. Sing s -> IFix f s -> DynamicallySorted f |
parseSort :: Parser DynamicSort Source #
Parser that accepts sort definitions such as bool
, int
, array int int
, array int (array ...)
.
toStaticSort :: forall (s :: Sort). SingI s => DynamicSort -> Maybe (Sing s) Source #
Tries to convert some sort (DynamicSort
) to a requested sort.
toStaticallySorted :: forall f (s :: Sort). SingI s => DynamicallySorted f -> Maybe (IFix f s) Source #
Tries to convert an expression (DynamicallySorted
) of some sort to an expression of requested sort.
Performs no conversions.