swarm-0.6.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.Language.Syntax.Pattern

Description

Pattern synonyms for untyped terms

Synopsis

Documentation

type Syntax = Syntax' () Source #

Syntax without type annotations.

sLoc :: forall ty. Lens' (Syntax' ty) SrcLoc Source #

sTerm :: forall ty. Lens' (Syntax' ty) (Term' ty) Source #

sType :: forall ty. Lens' (Syntax' ty) ty Source #

sComments :: forall ty. Lens' (Syntax' ty) Comments Source #

pattern Syntax :: SrcLoc -> Term -> Syntax Source #

Raw parsed syntax, without comments or type annotations.

pattern CSyntax :: SrcLoc -> Term -> Comments -> Syntax Source #

Untyped syntax with assocated comments.

pattern STerm :: Term -> Syntax Source #

Match an untyped term without annotations.

pattern TRequirements :: Text -> Term -> Term Source #

pattern TPair :: Term -> Term -> Term Source #

Match a TPair without annotations.

pattern TLam :: Var -> Maybe Type -> Term -> Term Source #

Match a TLam without annotations.

pattern TApp :: Term -> Term -> Term Source #

Match a TApp without annotations.

pattern (:$:) :: Term -> Syntax -> Term infixl 0 Source #

Convenient infix pattern synonym for application.

pattern TLet :: LetSyntax -> Bool -> Var -> Maybe Polytype -> Maybe Requirements -> Term -> Term -> Term Source #

Match a TLet without annotations.

pattern TTydef :: Var -> Polytype -> Maybe TydefInfo -> Term -> Term Source #

Match a STydef without annotations.

pattern TBind :: Maybe Var -> Maybe Polytype -> Maybe Requirements -> Term -> Term -> Term Source #

Match a TBind without annotations.

pattern TDelay :: Term -> Term Source #

Match a TDelay without annotations.

pattern TRcd :: Map Var (Maybe Term) -> Term Source #

Match a TRcd without annotations.

pattern TProj :: Term -> Var -> Term Source #

pattern TAnnotate :: Term -> Polytype -> Term Source #

Match a TAnnotate without annotations.

pattern TSuspend :: Term -> Term Source #

Match a TSuspend without annotations.

type Term = Term' () Source #