Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. -- Quoter unfortunately need to be in another file due to GHC staging restrictions
  2. import Quoter
  3.  
  4. foo :: ParsedExpr
  5. foo =
  6. [expr| Var "salads" |]
  7.  
  8. -- foo =
  9. ParsedExpr {parsedSource = " Var \"salads\" ", parsedExpr = Var "salads"}
  10.  
  11. bar :: ParsedExpr
  12. bar =
  13. [expr| Lam "f" (Lam "g" (Lam "x" (App (Var "g") (App (Var "f") (Var "x"))))) |]
  14.  
  15. -- bar =
  16. ParsedExpr
  17. { parsedSource =
  18. " Lam \"f\" (Lam \"g\" (Lam \"x\" (App (Var \"g\") (App (Var \"f\") (Var \"x\"))))) "
  19. , parsedExpr =
  20. Lam "f" (Lam "g" (Lam "x" (App (Var "g") (App (Var "f") (Var "x")))))
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement