ermine-0.6: Ermine

Copyright(c) Edward Kmett and Dan Doel 2012
LicenseBSD3
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Ermine.Parser.Type

Description

This module provides the parser for types

Synopsis

Documentation

type Ann = Annot Text Source

type Typ = Type (Maybe Text) (Var Text Text) Source

typ :: (Monad m, TokenParsing m) => m Typ Source

Parse a Type.

typ0 :: (Monad m, TokenParsing m) => m Typ Source

Parse an atomic type

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