on 267f708 help sign in
elk/src/AST/Expression/Valid.hs
30 lines 745 B history raw
1{-# OPTIONS_GHC -Wall #-}
2module AST.Expression.Valid where
4import qualified AST.Expression.General as General
5import qualified AST.Pattern as Pattern
6import qualified AST.Type as Type
7import qualified AST.Variable as Var
8import qualified Reporting.Region as R
11{-| "Normal" expressions. When the compiler checks that type annotations and
12ports are all paired with definitions in the appropriate order, it collapses
13them into a Def that is easier to work with in later phases of compilation.
14-}
15type Expr =
16 General.Expr R.Region Def Var.Raw Type.Raw
19type Expr' =
20 General.Expr' R.Region Def Var.Raw Type.Raw
23data Def =
24 Def Pattern.Raw Expr (Maybe Type.Raw)
27getPattern :: Def -> Pattern.Raw
28getPattern (Def pattern _ _) =
29 pattern