syntax-example

Example application using syntax, a library for abstract syntax descriptions.

Latest on Hackage:1.0.0.0

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

MIT licensed by Paweł Nowak
Maintained by Paweł Nowak

Example application using syntax, a library for abstract syntax descriptions.

The code:

Example input:

(\f->
(\x
     -> f     ((x) x)) (\x
-> f  (x x)
)
(\x -> "test")
(\y -> y +2.0e13))

Example output:

Abs "f" (App (App (App (Abs "x" (App (Var "f") (App (Var "x") (Var "x")))) (Abs "x" (App (Var "f") (App (Var "x") (Var "x"))))) (Abs "x" (Lit (LitStr "test")))) (Abs "y" (App (Var "y") (Lit (LitNum 2.0e13)))))
\f -> (\x -> f (x x)) (\x -> f (x x)) (\x -> "test") (\y -> y 2.0e13)