language-Modula2-0.1.5: Parser, pretty-printer, and more for the Modula-2 programming language
Safe HaskellNone
LanguageHaskell2010

Language.Modula2.ISO.Grammar

Description

Modula-2 grammar adapted from the ISO specification of the language.

Synopsis

Documentation

data ISOMixin l (f :: Type -> Type) (p :: Type -> Type) Source #

The names and types of all the new grammar productions in the ISO specification

Constructors

ISOMixin 

Fields

Instances

Instances details
Applicative (ISOMixin l f :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Language.Modula2.ISO.Grammar

Methods

pure :: (forall a. f0 a) -> ISOMixin l f f0

Apply (ISOMixin l f :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Language.Modula2.ISO.Grammar

Methods

(<*>) :: forall (p :: Type -> Type) (q :: Type -> Type). ISOMixin l f (p ~> q) -> ISOMixin l f p -> ISOMixin l f q

liftA2 :: (forall a. p a -> q a -> r a) -> ISOMixin l f p -> ISOMixin l f q -> ISOMixin l f r

liftA3 :: (forall a. p a -> q a -> r a -> s a) -> ISOMixin l f p -> ISOMixin l f q -> ISOMixin l f r -> ISOMixin l f s

Distributive (ISOMixin l f :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Language.Modula2.ISO.Grammar

Methods

collect :: forall p a (q :: Type -> Type). Functor p => (a -> ISOMixin l f q) -> p a -> ISOMixin l f (Compose p q)

distribute :: forall p (q :: Type -> Type). Functor p => p (ISOMixin l f q) -> ISOMixin l f (Compose p q)

cotraverse :: Functor m => (forall a. m (p a) -> q a) -> m (ISOMixin l f p) -> ISOMixin l f q

DistributiveTraversable (ISOMixin l f :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Language.Modula2.ISO.Grammar

Methods

collectTraversable :: forall f1 a (f2 :: Type -> Type). Traversable f1 => (a -> ISOMixin l f f2) -> f1 a -> ISOMixin l f (Compose f1 f2)

distributeTraversable :: forall f1 (f2 :: Type -> Type). Traversable f1 => f1 (ISOMixin l f f2) -> ISOMixin l f (Compose f1 f2)

cotraverseTraversable :: Traversable f1 => (forall x. f1 (f2 x) -> f0 x) -> f1 (ISOMixin l f f2) -> ISOMixin l f f0

Foldable (ISOMixin l f :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Language.Modula2.ISO.Grammar

Methods

foldMap :: Monoid m => (forall a. p a -> m) -> ISOMixin l f p -> m

Functor (ISOMixin l f :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Language.Modula2.ISO.Grammar

Methods

(<$>) :: (forall a. p a -> q a) -> ISOMixin l f p -> ISOMixin l f q

coerce :: forall (p :: Type -> Type) (q :: Type -> Type). (forall a. Coercible (p a) (q a)) => ISOMixin l f p -> ISOMixin l f q

Logistic (ISOMixin l f :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Language.Modula2.ISO.Grammar

Methods

deliver :: forall p (q :: Type -> Type). Contravariant p => p (ISOMixin l f q -> ISOMixin l f q) -> ISOMixin l f (Compose p (q ~> q))

Traversable (ISOMixin l f :: (Type -> Type) -> Type) Source # 
Instance details

Defined in Language.Modula2.ISO.Grammar

Methods

traverse :: Applicative m => (forall a. p a -> m (q a)) -> ISOMixin l f p -> m (ISOMixin l f q)

sequence :: forall m (p :: Type -> Type). Applicative m => ISOMixin l f (Compose m p) -> m (ISOMixin l f p)

LexicalParsing (Parser (ISOGrammar l) Text) Source # 
Instance details

Defined in Language.Modula2.ISO.Grammar

TokenParsing (Parser (ISOGrammar l) Text) Source # 
Instance details

Defined in Language.Modula2.ISO.Grammar

isoMixin :: forall l (g :: (Type -> Type) -> Type). (Modula2 l, Apply g, LexicalParsing (Parser g Text)) => Modula2Grammar l NodeWrap (Parser g Text) -> ISOMixin l NodeWrap (Parser g Text) -> ISOMixin l NodeWrap (Parser g Text) Source #

The new grammar productions in the ISO specification

isoGrammar :: forall l (g :: (Type -> Type) -> Type). (Modula2 l, Apply g, LexicalParsing (Parser g Text)) => GrammarBuilder (ISOGrammar l) g Parser Text Source #

All the productions of the ISO Modula-2 grammar