Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Language.Lojban.Presentation
Synopsis
- displayCanonicalBridi :: SimpleBridi -> Text
- displayStandardSimpleBridi :: StdGen -> SimpleBridi -> (Text, StdGen)
- displayVariantSimpleBridi :: StdGen -> SimpleBridi -> (Text, StdGen)
- displayReorderedStandardSimpleBridi :: StdGen -> SimpleBridi -> (Text, StdGen)
Documentation
displayCanonicalBridi :: SimpleBridi -> Text Source #
Displays bridi in canonical form.
The main motivation for this function lies in determining bridi equivalence. Essentially, two bridi are syntactically equivalent if and only if they yield the same representation after canonicalization.
displayStandardSimpleBridi :: StdGen -> SimpleBridi -> (Text, StdGen) Source #
Displays bridi in standard form: [x1] selbri x2 x3 x4 x5 (...) xn.
- Ellisis occurs in the first place and in the last places.
- All other missing places are filled with "zo'e".
displayVariantSimpleBridi :: StdGen -> SimpleBridi -> (Text, StdGen) Source #
Displays bridi with a random number of places before the selbri.
- Special case: if the first place is empty, then this function falls back to
displayStandardSimpleBridi
. - Ellisis occurs in the last places.
- All other missing places are filled with "zo'e".
Possible outputs are:
- selbri x1 x2 x3 x4 x5 (...) xn;
- x1 selbri x2 x3 x4 x5 (...) xn;
- x1 x2 selbri x3 x4 x5 (...) xn; and so on.
displayReorderedStandardSimpleBridi :: StdGen -> SimpleBridi -> (Text, StdGen) Source #