| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Alga.Language.SyntaxTree
- type SyntaxTree = [Sel]
- data Sel
- data Statement
Documentation
type SyntaxTree = [Sel] Source #
Syntax tree in our case is just a collection of syntactic elements.
Syntactic element corresponds to language tokens. Some of them have
corresponding constructor in Element, others have
to be simplified first.
Constructors
| Value NRatio | Literal value |
| Section [Sel] | Section |
| Multi [Sel] | Multivalue |
| CMulti (NonEmpty ([Sel], [Sel])) | Conditional multivalue |
| Reference String | Reference (name of variable) |
| Range NRatio NRatio | Range of values |
| Product Sel Sel | Product of principles |
| Division Sel Sel | Division of principles |
| Sum Sel Sel | Sum of principles |
| Diff Sel Sel | Subtraction of principles |
| Loop Sel Sel | Loop |
| Rotation Sel Sel | Rotation |
| Reverse Sel | Reversed principle |
Statement can be either definition or exposition. Expositions are only used in REPL.
Constructors
| Definition String SyntaxTree | |
| Exposition SyntaxTree |