about summary refs log tree commit diff
path: root/src/AST.hs
diff options
context:
space:
mode:
authortzlil <tzlils@protonmail.com>2023-04-15 01:54:47 +0300
committertzlil <tzlils@protonmail.com>2023-04-15 01:54:47 +0300
commit54bcc4595f28ba76384b5f018d72bca353cd88d3 (patch)
treedf0b1f9190f6b84313201ecd56d503187070d9bc /src/AST.hs
parent831d9c0737cd53be0b98f176f00c117de1ecc9ca (diff)
fourmolu formatting
Diffstat (limited to 'src/AST.hs')
-rw-r--r--src/AST.hs17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/AST.hs b/src/AST.hs
index 456338e..6f21d9e 100644
--- a/src/AST.hs
+++ b/src/AST.hs
@@ -1,28 +1,23 @@
 -- | Abstract syntax tree for the untyped lambda calculus, plus some helpers.
 module AST (
-  Expr (..)
+    Expr (..),
 ) where
 
 -- | Lambda Expressions
 data Expr
-  = Var String
-  | Lam String Expr
-  | App Expr Expr
-  deriving (Eq, Ord)
-
+    = Var String
+    | Lam String Expr
+    | App Expr Expr
+    deriving (Eq, Ord)
 
 -- https://www.haskellforall.com/2020/11/pretty-print-syntax-trees-with-this-one.html
 showLam, showApp, showVar :: Expr -> String
 showLam (Lam i e) = "\\" ++ i ++ " . " ++ showLam e
 showLam e = showApp e
-
 showApp (App e1 e2) = showApp e1 ++ " " ++ showVar e2
 showApp e = showVar e
-
 showVar (Var i) = i
 showVar e = "(" ++ showLam e ++ ")"
 
 instance Show Expr where
-  show e = showLam e
-
-
+    show e = showLam e