Grab leading OPTIONS pragmas.
ModuleAgda-2.7.0.1Haskell2010
Agda.Syntax.Parser.Helpers
Utility functions used in the Happy parser.
- 4 types
- 48 values
- PackageAgda-2.7.0.1
- Exports52
- LanguageHaskell2010
- LicenceMIT
- SourceHelpers.hs
Insert a top-level module if there is none. Also fix-up for the case the declarations in the top-level module are not indented (this is allowed as a special case).
Create a name from a string.
Create a qualified name from a list of strings
Create a qualified name from a string (used in pragmas). Range of each name component is range of whole string. TODO: precise ranges!
Polarity parser.
Result of parsing LamBinds.
Constructors
LamBindslamBindings :: aA number of domain-free or typed bindings or record patterns.
absurdBinding :: Maybe HidingFollowed by possibly a final absurd pattern.
Build a forall pi (forall x y z -> ...)
Converts lambda bindings to typed bindings.
Returns the value of the first erasure attribute, if any, or else the default value of type Erased.
Raises warnings for all attributes except for erasure attributes, and for multiple erasure attributes.
extLam Constructs extended lambdas.
extOrAbsLam Constructs extended or absurd lambdas.
Interpret an expression as a list of names and (not parsed yet) as-patterns
Match a pattern-matching "assignment" statement p <- e
Build a with-block
Build a with-statement
Build a do-statement
Turn an expression into a left hand side.
Turn an expression into a pattern. Fails if the expression is not a valid pattern.
Turn an expression into a name. Fails if the expression is not a valid identifier.
When given expression is e1 = e2, turn it into a named expression.
Call this inside an implicit argument {e} or {{e}}, where
an equality must be a named argument (rather than a cubical partial match).
Constructors
Instances1Show
Show RHSOrTypeSigsDefined in Agda-2.7.0.1 · Agda.Syntax.Parser.Helpers
Attributes
10 declarationsParsed attribute.
Parse an attribute.
Apply an attribute to thing (usually Arg). This will fail if one of the attributes is already set in the thing to something else than the default value.
Apply attributes to thing (usually Arg). Expects a reversed list of attributes. This will fail if one of the attributes is already set in the thing to something else than the default value.
Set the tactic attribute of a binder
Get the tactic attribute if present.
Report a parse error if two attributes in the list are of the same kind, thus, present conflicting information.
Report an attribute as conflicting (e.g., with an already set value).
Report attributes as conflicting (e.g., with each other). Precondition: List not emtpy.