Safe Haskell | None |
---|---|
Language | Haskell2010 |
The core functional representation
Synopsis
- data Expr a
- = Literal a (Literal (Expr a))
- | Constructor a (ProperName TypeName) (ProperName ConstructorName) [Ident]
- | Accessor a PSString (Expr a)
- | ObjectUpdate a (Expr a) [(PSString, Expr a)]
- | Abs a Ident (Expr a)
- | App a (Expr a) (Expr a)
- | Var a (Qualified Ident)
- | Case a [Expr a] [CaseAlternative a]
- | Let a [Bind a] (Expr a)
- data Bind a
- type Guard a = Expr a
- data CaseAlternative a = CaseAlternative {
- caseAlternativeBinders :: [Binder a]
- caseAlternativeResult :: Either [(Guard a, Expr a)] (Expr a)
- extractAnn :: Expr a -> a
- modifyAnn :: (a -> a) -> Expr a -> Expr a
Documentation
Data type for expressions and terms
Literal a (Literal (Expr a)) | A literal value |
Constructor a (ProperName TypeName) (ProperName ConstructorName) [Ident] | A data constructor (type name, constructor name, field names) |
Accessor a PSString (Expr a) | A record property accessor |
ObjectUpdate a (Expr a) [(PSString, Expr a)] | Partial record update |
Abs a Ident (Expr a) | Function introduction |
App a (Expr a) (Expr a) | Function application |
Var a (Qualified Ident) | Variable |
Case a [Expr a] [CaseAlternative a] | A case expression |
Let a [Bind a] (Expr a) | A let binding |
A let or module binding.
NonRec a Ident (Expr a) | Non-recursive binding for a single value |
Rec [((a, Ident), Expr a)] | Mutually recursive binding group for several values |
type Guard a = Expr a Source #
A guard is just a boolean-valued expression that appears alongside a set of binders
data CaseAlternative a Source #
An alternative in a case statement
CaseAlternative | |
|
Instances
Functor CaseAlternative Source # | |
Defined in Language.PureScript.CoreFn.Expr fmap :: (a -> b) -> CaseAlternative a -> CaseAlternative b # (<$) :: a -> CaseAlternative b -> CaseAlternative a # | |
Show a => Show (CaseAlternative a) Source # | |
Defined in Language.PureScript.CoreFn.Expr showsPrec :: Int -> CaseAlternative a -> ShowS # show :: CaseAlternative a -> String # showList :: [CaseAlternative a] -> ShowS # |
extractAnn :: Expr a -> a Source #
Extract the annotation from a term