Language.PureScript.CoreFn.Binders

purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.CoreFn.Binders

Description

The core functional representation for binders

Synopsis

- data Binder a
  - = NullBinder a
  - | LiteralBinder a (Literal (Binder a))
  - | VarBinder a Ident
  - | ConstructorBinder a (Qualified (ProperName 'TypeName)) (Qualified (ProperName 'ConstructorName)) [Binder a]
  - | NamedBinder a Ident (Binder a)
- extractBinderAnn :: Binder a -> a

# Documentation

data Binder a #

Data type for binders

Constructors

NullBinder a | Wildcard binder
LiteralBinder a (Literal (Binder a)) | A binder which matches a literal value
VarBinder a Ident | A binder which binds an identifier
ConstructorBinder a (Qualified (ProperName 'TypeName)) (Qualified (ProperName 'ConstructorName)) [Binder a] | A binder which matches a data constructor
NamedBinder a Ident (Binder a) | A binder which binds its input to an identifier

#### Instances

Instances details

Functor Binder # |
Instance details Defined in Language.PureScript.CoreFn.Binders Methods fmap :: (a -> b) -> Binder a -> Binder b # (<$) :: a -> Binder b -> Binder a #
Show a => Show (Binder a) # |
Instance details Defined in Language.PureScript.CoreFn.Binders Methods showsPrec :: Int -> Binder a -> ShowS # show :: Binder a -> String # showList :: [Binder a] -> ShowS #
Eq a => Eq (Binder a) # |
Instance details Defined in Language.PureScript.CoreFn.Binders Methods (==) :: Binder a -> Binder a -> Bool # (/=) :: Binder a -> Binder a -> Bool #
Ord a => Ord (Binder a) # |
Instance details Defined in Language.PureScript.CoreFn.Binders Methods compare :: Binder a -> Binder a -> Ordering # (<) :: Binder a -> Binder a -> Bool # (<=) :: Binder a -> Binder a -> Bool # (>) :: Binder a -> Binder a -> Bool # (>=) :: Binder a -> Binder a -> Bool # max :: Binder a -> Binder a -> Binder a # min :: Binder a -> Binder a -> Binder a #

extractBinderAnn :: Binder a -> a #