swarm-0.7.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellNone
LanguageHaskell2010

Swarm.Language.Syntax.Pattern

Description

Pattern synonyms for untyped terms

Synopsis

Documentation

type Syntax = Syntax' () Source #

Syntax without type annotations.

sLoc :: forall ty f. Functor f => (SrcLoc -> f SrcLoc) -> Syntax' ty -> f (Syntax' ty) Source #

sTerm :: forall ty f. Functor f => (Term' ty -> f (Term' ty)) -> Syntax' ty -> f (Syntax' ty) Source #

sType :: forall ty f. Functor f => (ty -> f ty) -> Syntax' ty -> f (Syntax' ty) Source #

sComments :: forall ty f. Functor f => (Comments -> f Comments) -> Syntax' ty -> f (Syntax' ty) 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 RawPolytype -> Maybe Polytype -> Maybe Requirements -> Term -> Term -> Term Source #

Match a TLet without annotations.

pattern TTydef :: TDVar -> 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 -> RawPolytype -> Term Source #

Match a TAnnotate without annotations.

pattern TSuspend :: Term -> Term Source #

Match a TSuspend without annotations.

pattern TParens :: Term -> Term Source #

Match a TParens without annotations.

type Term = Term' () Source #