Copyright | (c) Edward Kmett and Dan Doel 2012 |
---|---|
License | BSD3 |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
This module provides the parser for types
- type Ann = Annot Text
- type Typ = Type (Maybe Text) (Var Text Text)
- typ :: (Monad m, TokenParsing m) => m Typ
- typ0 :: (Monad m, TokenParsing m) => m Typ
- annotation :: (Monad m, TokenParsing m) => m Ann
- typVarBinding :: (Monad m, TokenParsing m) => m ([Text], Kind (Maybe Text))
- typVarBindings :: (Monad m, TokenParsing m) => m [(Var Text a, Kind (Maybe Text))]
- someTypVarBindings :: (Monad m, TokenParsing m) => m [(Var Text a, Kind (Maybe Text))]
- quantifier :: (Monad m, TokenParsing m) => String -> m ([Text], [(Var Text a, Kind (Maybe Text))])
- quantBindings :: (Monad m, TokenParsing m) => m ([Text], [(Var Text a, Kind (Maybe Text))])
Documentation
annotation :: (Monad m, TokenParsing m) => m Ann Source
typVarBinding :: (Monad m, TokenParsing m) => m ([Text], Kind (Maybe Text)) Source
Parses an optionally annotated type variable.
typVarBinding ::= ( ident : kind ) | ident
typVarBindings :: (Monad m, TokenParsing m) => m [(Var Text a, Kind (Maybe Text))] Source
Parses a series of type var bindings, processing the result to a more usable format.
typVarBindings ::= empty | someTypVarBindings
someTypVarBindings :: (Monad m, TokenParsing m) => m [(Var Text a, Kind (Maybe Text))] Source
Parses a series of type var bindings, processing the result to a more usable format.
someTypVarBindings ::= typVarBinding typVarBindings
quantifier :: (Monad m, TokenParsing m) => String -> m ([Text], [(Var Text a, Kind (Maybe Text))]) Source
Parses a quantifier.
quantifier ::= Q quantBindings .
quantBindings :: (Monad m, TokenParsing m) => m ([Text], [(Var Text a, Kind (Maybe Text))]) Source
Parses the bound variables for a quantifier.
quantBindings ::= {kindVars} | someTypVarBindings | {kindVars} typVarBindings