Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Auxiliary types and functions for use with grammars translated to Haskell
with gf -output-format=haskell -haskell=concrete
Synopsis
- class EnumAll a where
- enumAll :: [a]
- table :: (Ord k, EnumAll k) => [a] -> k -> a
- type Str = [Tok]
- data Tok
- type Prefix = String
- fromStr :: Str -> String
- class Has_s r a | r -> a where
- proj_s :: r -> a
- data R_s t = R_s t
- to_R_s :: Has_s r t => r -> R_s t
- (+++) :: Applicative f => f [a] -> f [a] -> f [a]
- (!) :: Monad m => (t -> m (m a)) -> t -> m a
- (!$) :: Monad m => (a1 -> m a2) -> m a1 -> m a2
- (!*) :: Monad m => m (a1 -> m a2) -> m a1 -> m a2
Concrete syntax
Common record types
class Has_s r a | r -> a where Source #
Overloaded function to project the s
field from any record type
Haskell representation of the GF record type {s:t}
R_s t |
to_R_s :: Has_s r t => r -> R_s t Source #
Coerce from any record type {...,s:t,...}
to the supertype {s:t}
Variants
(+++) :: Applicative f => f [a] -> f [a] -> f [a] infixr 5 Source #
Concatenation with variants