TinyLaunchbury-1.0: Simple implementation of call-by-need using Launchbury's semantics




data Expr Source


Lambda Name Expr 
Apply Expr Name 
Var Name 
Let Bindings Expr 
Prim Name Expr Expr 
Ctor Int [Name] 
Case Expr Alts 


Eq Expr 
Show Expr

Displays an Expression using a more common lambda calculus syntax rather than just printing the syntax tree.

reduce :: Expr -> StringSource

Reduces an expression, and returns a string containing the log appended with the result

displayReduce :: Expr -> IO ()Source

Prints the result of reduce to stdout. The main reason for this function is that the log contains newline Chars, and newlines don't format correctly in ghci.