Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Statement
- probeAlga :: Text -> Bool
- parseAlga :: String -> Text -> Either String [Statement]
- showStatement :: Statement -> Text
- showSyntaxTree :: SyntaxTree -> Text
- showPrinciple :: Principle -> Text
- divisionOp :: String
- autoDel :: Char
Documentation
Statement can be either definition or exposition. Expositions are only used in REPL.
:: String | Name of file |
-> Text | Text to parse |
-> Either String [Statement] | Error message or parsed statements |
Entry point for ALGA parsing.
showStatement :: Statement -> Text Source
Render a statement. This handles definitions and expositions.
showSyntaxTree :: SyntaxTree -> Text Source
Render syntax tree.
showPrinciple :: Principle -> Text Source
Show principle. This is useful for printing of simplified principles
back to user. We can use the same pretty-printing algorithm as for syntax
trees, but this requires us to perform transformation from Principle
to
SyntaxTree
, which is trivial.