You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
319 B

2 years ago
  1. module Syntax (Expr(..), Decl(..), Program) where
  2. data Expr
  3. = Var String
  4. | App Expr Expr
  5. | Lam String Expr
  6. | Let [Decl] Expr
  7. deriving (Eq, Show)
  8. data Decl
  9. = Decl { declName :: String
  10. , declRhs :: Expr
  11. , declWhere :: Maybe [Decl]
  12. }
  13. deriving (Eq, Show)
  14. type Program = [Decl]