Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Language.Modula2
Description
The programming language Modula-2
Synopsis
- parseModule :: Version l -> Text -> ParseResults Text [Placed (Module l l Placed Placed)]
- parseAndSimplifyModule :: (Modula2 l, Nameable l, Functor (Auto ConstantFold) (Expression l l)) => Version l -> Text -> ParseResults Text [Placed (Module l l Placed Placed)]
- resolvePosition :: Text -> NodeWrap a -> Placed a
- resolvePositions :: (p ~ NodeWrap, q ~ Placed, Functor (Map p q) g) => Text -> p (g p p) -> q (g q q)
- type Placed = (,) (Int, ParsedLexemes, Int)
- data Version l where
- data SomeVersion where
- SomeVersion :: Version l -> SomeVersion
Documentation
parseModule :: Version l -> Text -> ParseResults Text [Placed (Module l l Placed Placed)] Source #
Parse the given text of a single module.
parseAndSimplifyModule :: (Modula2 l, Nameable l, Functor (Auto ConstantFold) (Expression l l)) => Version l -> Text -> ParseResults Text [Placed (Module l l Placed Placed)] Source #
Parse the given text of a single module and fold constants inside it.
resolvePosition :: Text -> NodeWrap a -> Placed a Source #
Replace the stored positions of the given node with offset from the start of the given source text
resolvePositions :: (p ~ NodeWrap, q ~ Placed, Functor (Map p q) g) => Text -> p (g p p) -> q (g q q) Source #
Replace the stored positions in the entire tree with offsets from the start of the given source text
type Placed = (,) (Int, ParsedLexemes, Int) Source #
Every node in a parsed and resolved AST is wrapped with this functor
data SomeVersion where Source #
The language version in existential container
Constructors
SomeVersion :: Version l -> SomeVersion |
Instances
Show SomeVersion Source # | |
Defined in Language.Modula2 Methods showsPrec :: Int -> SomeVersion -> ShowS # show :: SomeVersion -> String # showList :: [SomeVersion] -> ShowS # |