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

Swarm.Language.Parser.Type

Description

Parsing types in the Swarm language.

Synopsis

Documentation

parsePolytype :: Parser Polytype Source #

Parse a Swarm language polytype, which starts with an optional quanitifation (forall followed by one or more variables and a period) followed by a type. Note that anything accepted by parseType is also accepted by parsePolytype.

parseType :: Parser Type Source #

Parse a Swarm language (mono)type.

parseTypeMolecule :: Parser Type Source #

A "type molecule" consists of either a type constructor applied to a chain of type atoms, or just a type atom by itself. We have to separate this out from parseTypeAtom to deal with the left recursion.

parseTypeAtom :: Parser Type Source #

A "type atom" consists of some atomic type snytax --- type variables, things in brackets of some kind, or a lone type constructor.

parseTyCon :: Parser TyCon Source #

A type constructor.