@hackage / syntax-example

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

Latest1.0.0.0

About

Metadata

  • Last updated , by pawel834
  • License MIT
  • Maintained by: Paweł Nowak <pawel834@gmail.com>

  • Lottery factor: 0

Links

Installation

Readme

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)