Safe Haskell | None |
---|---|
Language | Haskell2010 |
Main module for the library
Synopsis
- lexATS :: String -> Either String [Token]
- parse :: String -> Either ATSError (ATS AlexPosn)
- parseWithCtx :: FixityState AlexPosn -> ([Token] -> [Token]) -> String -> Either ATSError (ATS AlexPosn)
- parseM :: String -> Either ATSError (ATS AlexPosn)
- printATS :: Eq a => ATS a -> String
- printATSCustom :: Eq a => Float -> Int -> ATS a -> String
- printATSFast :: Eq a => ATS a -> String
- printErr :: MonadIO m => ATSError -> m ()
- warnErr :: MonadIO m => FilePath -> ATSError -> m ()
- defaultFixityState :: FixityState a
- getDependencies :: ATS a -> [FilePath]
- newtype ATS a = ATS {
- unATS :: [Declaration a]
- data Declaration a
- = Func { }
- | Impl {
- implArgs :: Args a
- _impl :: Implementation a
- | ProofImpl {
- implArgs :: Args a
- _impl :: Implementation a
- | Val { }
- | StaVal [Universal a] String (Type a)
- | PrVal {
- valUniversals :: [Universal a]
- prvalPat :: Pattern a
- _prValExpr :: Maybe (StaticExpression a)
- prValType :: Maybe (Type a)
- | PrVar {
- prvarPat :: Pattern a
- _prVarExpr :: Maybe (StaticExpression a)
- prVarType :: Maybe (Type a)
- | Var { }
- | AndDecl { }
- | Include String
- | Load { }
- | Stadef String (SortArgs a) (Either (StaticExpression a, Maybe (Sort a)) (Maybe (Type a), Type a))
- | CBlock String
- | TypeDef a String (SortArgs a) (Type a) (Maybe (Sort a))
- | ViewTypeDef a String (SortArgs a) (Type a)
- | SumType { }
- | SumViewType { }
- | AbsType a String (SortArgs a) (Maybe (Type a))
- | AbsViewType a String (SortArgs a) (Maybe (Type a))
- | AbsView a String (SortArgs a) (Maybe (Type a))
- | AbsVT0p a String (SortArgs a) (Maybe (Type a))
- | AbsT0p a String (SortArgs a) (Maybe (Type a))
- | ViewDef a String (SortArgs a) (Type a)
- | OverloadOp a (BinOp a) (Name a) (Maybe Int)
- | OverloadIdent a String (Name a) (Maybe Int)
- | Comment { }
- | DataProp {
- pos :: a
- propName :: String
- propArgs :: SortArgs a
- _propLeaves :: [DataPropLeaf a]
- | DataView a String (SortArgs a) (NonEmpty (Leaf a))
- | Extern a (Declaration a)
- | Define String
- | SortDef a String (Either (Sort a) (Universal a))
- | AndD (Declaration a) (Declaration a)
- | Local a (ATS a) (ATS a)
- | AbsProp a String [Arg a]
- | Assume (Name a) (SortArgs a) (Type a)
- | TKind a (Name a) String
- | SymIntr a [Name a]
- | Stacst a (Name a) (Type a) (Maybe (StaticExpression a))
- | PropDef a String (Args a) (Type a)
- | FixityDecl (Fixity a) [String]
- | MacDecl a String (Maybe [String]) (Expression a)
- | DataSort a String (NonEmpty (DataSortLeaf a))
- | Exception String (Type a)
- | ExtVar a String (Expression a)
- | AbsImpl a (Name a) (SortArgs a) (Type a)
- data Expression a
- = Let a (ATS a) (Maybe (Expression a))
- | VoidLiteral a
- | Call {
- callName :: Name a
- callImplicits :: [[Type a]]
- callUniversals :: [[Type a]]
- callProofs :: Maybe [Expression a]
- callArgs :: [Expression a]
- | NamedVal (Name a)
- | ListLiteral a String (Type a) [Expression a]
- | If {
- cond :: Expression a
- whenTrue :: Expression a
- elseExpr :: Maybe (Expression a)
- | UintLit Natural
- | FloatLit Float
- | IntLit Integer
- | HexLit String
- | UnderscoreLit a
- | Lambda a (LambdaType a) (Pattern a) (Expression a)
- | LinearLambda a (LambdaType a) (Pattern a) (Expression a)
- | Index a (Name a) (Expression a)
- | Access a (Expression a) (Name a)
- | StringLit String
- | CharLit Char
- | AddrAt a (Expression a)
- | ViewAt a (Expression a)
- | Binary (BinOp a) (Expression a) (Expression a)
- | Unary (UnOp a) (Expression a)
- | IfCase {
- posE :: a
- ifArms :: [(Expression a, LambdaType a, Expression a)]
- | Case {
- posE :: a
- kind :: Addendum
- val :: Expression a
- _arms :: [(Pattern a, LambdaType a, Expression a)]
- | RecordValue a (NonEmpty (String, Expression a))
- | BoxRecordValue a (NonEmpty (String, Expression a))
- | Precede (Expression a) (Expression a)
- | ProofExpr a (NonEmpty (Expression a)) (Expression a)
- | TypeSignature (Expression a) (Type a)
- | WhereExp (Expression a) (ATS a)
- | TupleEx a (NonEmpty (Expression a))
- | BoxTupleEx a (NonEmpty (Expression a))
- | While a (Expression a) (Expression a)
- | WhileStar a [Universal a] (StaticExpression a) [Arg a] (Expression a) (Expression a) (Args a)
- | For a (Expression a) (Expression a)
- | ForStar a [Universal a] (StaticExpression a) [Arg a] (Expression a) (Expression a)
- | Actions (ATS a)
- | Begin a (Expression a)
- | BinList {
- _op :: BinOp a
- _exprs :: [Expression a]
- | PrecedeList {
- _exprs :: [Expression a]
- | FixAt a String (StackFunction a)
- | LambdaAt a (StackFunction a)
- | LinearLambdaAt a (StackFunction a)
- | ParenExpr a (Expression a)
- | CommentExpr String (Expression a)
- | MacroVar a String
- data Type a
- = Tuple a [Type a]
- | BoxTuple a (NonEmpty (Type a))
- | Named (Name a)
- | Ex (Existential a) (Maybe (Type a))
- | ForA (Universal a) (Type a)
- | Dependent {
- _typeCall :: Name a
- _typeCallArgs :: [Type a]
- | Unconsumed (Type a)
- | AsProof (Type a) (Maybe (Type a))
- | FromVT (Type a)
- | MaybeVal (Type a)
- | AtExpr a (Type a) (StaticExpression a)
- | ArrayType a (Type a) (StaticExpression a)
- | ProofType a (NonEmpty (Type a)) (NonEmpty (Type a))
- | ConcreteType (StaticExpression a)
- | RefType (Type a)
- | ViewType a (Type a)
- | FunctionType String (Type a) (Type a)
- | ImplicitType a
- | ViewLiteral Addendum
- | AnonymousRecord a (NonEmpty (String, Type a))
- | WhereType a (Type a) String (SortArgs a) (Type a)
- | AddrType a
- data Function a
- = Fun {
- _preF :: PreFunction Expression a
- | Fn {
- _preF :: PreFunction Expression a
- | Fnx {
- _preF :: PreFunction Expression a
- | And {
- _preF :: PreFunction Expression a
- | PrFun { }
- | PrFn { }
- | Praxi { }
- | CastFn {
- _preF :: PreFunction Expression a
- = Fun {
- data Implementation a = Implement {
- pos :: a
- preUniversalsI :: [Universal a]
- implicits :: [[Type a]]
- universalsI :: [Universal a]
- nameI :: Name a
- iArgs :: Args a
- _iExpression :: Either (StaticExpression a) (Expression a)
- data Pattern a
- = PName (Name a) [Pattern a]
- | PSum String (Pattern a)
- | PLiteral (Expression a)
- | Guarded a (Expression a) (Pattern a)
- | Free (Pattern a)
- | Proof a [Pattern a] [Pattern a]
- | TuplePattern [Pattern a]
- | BoxTuplePattern a [Pattern a]
- | AtPattern a (Pattern a)
- | UniversalPattern a String [Universal a] (Maybe (Pattern a))
- | ExistentialPattern (Existential a) (Pattern a)
- | As a (Pattern a) (Pattern a)
- | BinPattern a (BinOp a) (Pattern a) (Pattern a)
- data Name a
- data UnOp a
- data BinOp a where
- data DataPropLeaf a = DataPropLeaf {
- propU :: [Universal a]
- _propExpr1 :: Expression a
- _propExpr2 :: Maybe (Expression a)
- data Leaf a = Leaf {
- _constructorUniversals :: [Universal a]
- name :: String
- constructorArgs :: [StaticExpression a]
- maybeType :: Maybe (Type a)
- data DataSortLeaf a = DataSortLeaf [Universal a] (Sort a) (Maybe (Sort a))
- data Arg a
- data Addendum
- data LambdaType a
- = Plain a
- | Spear a
- | ProofArrow a
- | ProofSpear a
- | Full a String
- data Universal a = Universal {}
- data Existential a = Existential {}
- data PreFunction ek a = PreF {
- fname :: Name a
- sig :: Maybe String
- preUniversals :: [Universal a]
- universals :: [Universal a]
- args :: Args a
- returnType :: Maybe (Type a)
- termetric :: Maybe (Maybe (StaticExpression a))
- _expression :: Maybe (ek a)
- data StaticExpression a
- = StaticVal (Name a)
- | StaticBinary (BinOp a) (StaticExpression a) (StaticExpression a)
- | StaticInt Integer
- | StaticHex String
- | SPrecede (StaticExpression a) (StaticExpression a)
- | SPrecedeList {
- _sExprs :: [StaticExpression a]
- | StaticVoid a
- | Sif {
- scond :: StaticExpression a
- whenTrue :: StaticExpression a
- selseExpr :: StaticExpression a
- | SCall (Name a) [[Type a]] [[Type a]] [StaticExpression a] (Maybe [Expression a])
- | SUnary (UnOp a) (StaticExpression a)
- | SLet a [Declaration a] (Maybe (StaticExpression a))
- | SCase Addendum (StaticExpression a) [(Pattern a, LambdaType a, StaticExpression a)]
- | SString String
- | Witness a (StaticExpression a) (StaticExpression a)
- | ProofLambda a (LambdaType a) (Pattern a) (StaticExpression a)
- | ProofLinearLambda a (LambdaType a) (Pattern a) (StaticExpression a)
- | WhereStaExp (StaticExpression a) (ATS a)
- | SParens (StaticExpression a)
- data StackFunction a = StackF {
- stSig :: String
- stArgs :: [Arg a]
- stReturnType :: Type a
- stExpression :: Expression a
- data Paired a b
- data Fixity a
- data SortArg a
- data Sort a
- type SortArgs a = Maybe [SortArg a]
- type Args a = Maybe [Arg a]
- type Fix = Either Int String
- type FixityState a = Map String (Fixity a)
- data Token
- = Identifier AlexPosn String
- | SpecialIdentifier AlexPosn String
- | Keyword AlexPosn Keyword
- | IntTok AlexPosn Integer
- | HexIntTok AlexPosn String
- | FloatTok AlexPosn Float
- | CharTok AlexPosn Char
- | StringTok AlexPosn String
- | Special AlexPosn String
- | CBlockLex AlexPosn String
- | IdentifierSpace AlexPosn String
- | Operator AlexPosn String
- | Arrow AlexPosn String
- | FuncType AlexPosn String
- | CommentLex AlexPosn String
- | CommentBegin AlexPosn
- | CommentEnd AlexPosn
- | CommentContents AlexPosn String
- | MacroBlock AlexPosn String
- | UintTok AlexPosn Natural
- | SignatureTok AlexPosn String
- | DoubleParenTok AlexPosn
- | DoubleBracesTok AlexPosn
- | DoubleBracketTok AlexPosn
- | SpecialBracket AlexPosn
- | FixityTok AlexPosn String
- | End
- data AlexPosn = AlexPn !Int !Int !Int
- data Keyword
- = KwFun
- | KwFnx
- | KwAnd
- | KwDatatype
- | KwDatavtype
- | KwAssume
- | KwAbsimpl
- | KwTypedef
- | KwVtypedef
- | KwVtype Addendum
- | KwStaload Bool
- | KwDynload Bool
- | KwLet
- | KwIn
- | KwLocal
- | KwEnd
- | KwImplement
- | KwCase Addendum
- | KwIf
- | KwSif
- | KwThen
- | KwElse
- | KwVal Addendum
- | KwVar
- | KwLambda
- | KwLinearLambda
- | KwInclude
- | KwWhen
- | KwOf
- | KwAbsprop
- | KwPrval
- | KwPrvar
- | KwStadef
- | KwPraxi
- | KwWhile
- | KwWhileStar
- | KwFor
- | KwForStar
- | KwWhere
- | KwBegin
- | KwOverload
- | KwWith
- | KwIfCase
- | KwDataview
- | KwDataprop
- | KwView Addendum
- | KwAbstype
- | KwType
- | KwAbst0p Addendum
- | KwAbsvt0p Addendum
- | KwT0p Addendum
- | KwVt0p Addendum
- | KwPrfun
- | KwPrfn
- | KwCastfn
- | KwExtern
- | KwAbsvtype
- | KwProofImplement
- | KwSortdef
- | KwExtVar
- | KwPropdef
- | KwRaise
- | KwTKind
- | KwMod
- | KwFixAt
- | KwLambdaAt
- | KwLinearLambdaAt
- | KwAddrAt
- | KwAddr
- | KwSta
- | KwAs
- | KwViewAt
- | KwViewdef
- | KwSymintr
- | KwAbsview
- | KwFn
- | KwInfix
- | KwInfixr
- | KwInfixl
- | KwStacst
- | KwListLit String
- | KwMacdef
- | KwDatasort
- | KwException
- data ATSError
- preF :: Traversal' (Function a) (PreFunction Expression a)
- expression :: Lens' (PreFunction ek a) (Maybe (ek a))
- fun :: Traversal' (Declaration a) (Function a)
- leaves :: Traversal' (Declaration a) (NonEmpty (Leaf a))
- constructorUniversals :: Lens' (Leaf a) [Universal a]
- typeCall :: Traversal' (Type a) (Name a)
- typeCallArgs :: Traversal' (Type a) [Type a]
- languageATSVersion :: Version
Functions for working with syntax
lexATS :: String -> Either String [Token] Source #
This function turns a string into a stream of tokens for the parser.
parseWithCtx :: FixityState AlexPosn -> ([Token] -> [Token]) -> String -> Either ATSError (ATS AlexPosn) Source #
Parse with some fixity declarations already in scope.
parseM :: String -> Either ATSError (ATS AlexPosn) Source #
Parse a string containing ATS source, disregarding comments.
printATSFast :: Eq a => ATS a -> String Source #
Slightly faster pretty-printer without indendation (for code generation).
warnErr :: MonadIO m => FilePath -> ATSError -> m () Source #
Same as printErr
, but print a yellow warning message instead.
defaultFixityState :: FixityState a Source #
Fixities for operators in the ATS prelude.
Library functions
getDependencies :: ATS a -> [FilePath] Source #
Extract a list of files that some code depends on.
Syntax Tree
An ATS file, containing a list of declarations
ATS | |
|
Instances
Eq a => Eq (ATS a) Source # | |
Show a => Show (ATS a) Source # | |
Generic (ATS a) Source # | |
Semigroup (ATS a) Source # | |
Monoid (ATS a) Source # | |
Eq a => Pretty (ATS a) Source # | |
Defined in Language.ATS.PrettyPrint | |
NFData a => NFData (ATS a) Source # | |
Defined in Language.ATS.Types | |
type Rep (ATS a) Source # | |
Defined in Language.ATS.Types type Rep (ATS a) = D1 (MetaData "ATS" "Language.ATS.Types" "language-ats-1.7.6.1-BhewcS2tnMx7p4FPVrvPPG" True) (C1 (MetaCons "ATS" PrefixI True) (S1 (MetaSel (Just "unATS") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Declaration a]))) |
data Declaration a Source #
Declarations for functions, values, actions, etc.
Instances
data Expression a Source #
A (possibly effectful) expression.
Instances
A type for parsed ATS types
Tuple a [Type a] | |
BoxTuple a (NonEmpty (Type a)) | |
Named (Name a) | |
Ex (Existential a) (Maybe (Type a)) | |
ForA (Universal a) (Type a) | |
Dependent | |
| |
Unconsumed (Type a) | |
AsProof (Type a) (Maybe (Type a)) | |
FromVT (Type a) | |
MaybeVal (Type a) | a?! |
AtExpr a (Type a) (StaticExpression a) | a? |
ArrayType a (Type a) (StaticExpression a) | |
ProofType a (NonEmpty (Type a)) (NonEmpty (Type a)) | |
ConcreteType (StaticExpression a) | |
RefType (Type a) | |
ViewType a (Type a) | |
FunctionType String (Type a) (Type a) | |
ImplicitType a | |
ViewLiteral Addendum | |
AnonymousRecord a (NonEmpty (String, Type a)) | |
WhereType a (Type a) String (SortArgs a) (Type a) | |
AddrType a | addr |
Instances
A function declaration accounting for all keywords ATS uses to define them.
Fun | |
| |
Fn | |
| |
Fnx | |
| |
And | |
| |
PrFun | |
PrFn | |
Praxi | |
CastFn | |
|
Instances
data Implementation a Source #
An implement
or primplmnt
declaration
Implement | |
|
Instances
A data type for patterns.
PName (Name a) [Pattern a] | |
PSum String (Pattern a) | |
PLiteral (Expression a) | |
Guarded a (Expression a) (Pattern a) | |
Free (Pattern a) | |
Proof a [Pattern a] [Pattern a] | |
TuplePattern [Pattern a] | |
BoxTuplePattern a [Pattern a] | |
AtPattern a (Pattern a) | |
UniversalPattern a String [Universal a] (Maybe (Pattern a)) | |
ExistentialPattern (Existential a) (Pattern a) | |
As a (Pattern a) (Pattern a) | |
BinPattern a (BinOp a) (Pattern a) (Pattern a) | For use with e.g. |
Instances
Unqualified String | |
Qualified a String String | A name can be qualified e.g. |
SpecialName a String | A name for builtin functions such as |
Functorial String String | |
FieldName a String String |
Instances
Unary operators
Instances
Eq a => Eq (UnOp a) Source # | |
Show a => Show (UnOp a) Source # | |
Generic (UnOp a) Source # | |
Pretty (UnOp a) Source # | |
Defined in Language.ATS.PrettyPrint | |
NFData a => NFData (UnOp a) Source # | |
Defined in Language.ATS.Types | |
type Rep (UnOp a) Source # | |
Defined in Language.ATS.Types type Rep (UnOp a) = D1 (MetaData "UnOp" "Language.ATS.Types" "language-ats-1.7.6.1-BhewcS2tnMx7p4FPVrvPPG" False) (C1 (MetaCons "Negate" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Deref" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "SpecialOp" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))) |
Binary operators on expressions
Add | |
Mult | |
Div | |
Sub | |
GreaterThan | |
GreaterThanEq | |
LessThan | |
LessThanEq | |
Equal | |
LogicalAnd | |
LogicalOr | |
StaticEq | |
Mod | |
NotEq | |
Mutate | := |
At | |
SpearOp | -> |
SpecialInfix a String |
Instances
data DataPropLeaf a Source #
DataPropLeaf | |
|
Instances
Leaf | |
|
Instances
Eq a => Eq (Leaf a) Source # | |
Show a => Show (Leaf a) Source # | |
Generic (Leaf a) Source # | |
NFData a => NFData (Leaf a) Source # | |
Defined in Language.ATS.Types | |
type Rep (Leaf a) Source # | |
Defined in Language.ATS.Types type Rep (Leaf a) = D1 (MetaData "Leaf" "Language.ATS.Types" "language-ats-1.7.6.1-BhewcS2tnMx7p4FPVrvPPG" False) (C1 (MetaCons "Leaf" PrefixI True) ((S1 (MetaSel (Just "_constructorUniversals") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Universal a]) :*: S1 (MetaSel (Just "name") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :*: (S1 (MetaSel (Just "constructorArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [StaticExpression a]) :*: S1 (MetaSel (Just "maybeType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Type a)))))) |
data DataSortLeaf a Source #
DataSortLeaf [Universal a] (Sort a) (Maybe (Sort a)) |
Instances
An argument to a function.
Instances
Eq a => Eq (Arg a) Source # | |
Show a => Show (Arg a) Source # | |
Generic (Arg a) Source # | |
Eq a => Pretty (Arg a) Source # | |
Defined in Language.ATS.PrettyPrint | |
NFData a => NFData (Arg a) Source # | |
Defined in Language.ATS.Types | |
type Rep (Arg a) Source # | |
Defined in Language.ATS.Types type Rep (Arg a) = D1 (MetaData "Arg" "Language.ATS.Types" "language-ats-1.7.6.1-BhewcS2tnMx7p4FPVrvPPG" False) (C1 (MetaCons "Arg" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Paired String (Type a)))) :+: C1 (MetaCons "PrfArg" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Arg a]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Arg a)))) |
Determines the default behavior for incomplete pattern matches
data LambdaType a Source #
A type for =>
, =<cloref1>
, etc.
Plain a | |
Spear a | |
ProofArrow a | =>> |
ProofSpear a | =/=> |
Full a String | =/=>> |
Instances
Wrapper for universal quantifiers (refinement types)
Instances
Eq a => Eq (Universal a) Source # | |
Show a => Show (Universal a) Source # | |
Generic (Universal a) Source # | |
Eq a => Pretty (Universal a) Source # | |
Defined in Language.ATS.PrettyPrint | |
NFData a => NFData (Universal a) Source # | |
Defined in Language.ATS.Types | |
type Rep (Universal a) Source # | |
Defined in Language.ATS.Types type Rep (Universal a) = D1 (MetaData "Universal" "Language.ATS.Types" "language-ats-1.7.6.1-BhewcS2tnMx7p4FPVrvPPG" False) (C1 (MetaCons "Universal" PrefixI True) (S1 (MetaSel (Just "bound") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]) :*: (S1 (MetaSel (Just "typeU") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Sort a))) :*: S1 (MetaSel (Just "prop") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [StaticExpression a])))) |
data Existential a Source #
Wrapper for existential quantifiers/types
Instances
data PreFunction ek a Source #
PreF | |
|
Instances
data StaticExpression a Source #
StaticVal (Name a) | |
StaticBinary (BinOp a) (StaticExpression a) (StaticExpression a) | |
StaticInt Integer | |
StaticHex String | |
SPrecede (StaticExpression a) (StaticExpression a) | |
SPrecedeList | |
| |
StaticVoid a | |
Sif | |
| |
SCall (Name a) [[Type a]] [[Type a]] [StaticExpression a] (Maybe [Expression a]) | |
SUnary (UnOp a) (StaticExpression a) | |
SLet a [Declaration a] (Maybe (StaticExpression a)) | |
SCase Addendum (StaticExpression a) [(Pattern a, LambdaType a, StaticExpression a)] | |
SString String | ext# |
Witness a (StaticExpression a) (StaticExpression a) | #[ m | () ] |
ProofLambda a (LambdaType a) (Pattern a) (StaticExpression a) | |
ProofLinearLambda a (LambdaType a) (Pattern a) (StaticExpression a) | |
WhereStaExp (StaticExpression a) (ATS a) | |
SParens (StaticExpression a) |
Instances
data StackFunction a Source #
A type for stack-allocated functions. See here for more.
StackF | |
|
Instances
Instances
(Eq a, Eq b) => Eq (Paired a b) Source # | |
(Show a, Show b) => Show (Paired a b) Source # | |
Generic (Paired a b) Source # | |
(NFData a, NFData b) => NFData (Paired a b) Source # | |
Defined in Language.ATS.Types | |
type Rep (Paired a b) Source # | |
Defined in Language.ATS.Types type Rep (Paired a b) = D1 (MetaData "Paired" "Language.ATS.Types" "language-ats-1.7.6.1-BhewcS2tnMx7p4FPVrvPPG" False) (C1 (MetaCons "Both" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 b)) :+: (C1 (MetaCons "First" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)) :+: C1 (MetaCons "Second" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 b)))) |
Instances
Instances
Eq a => Eq (SortArg a) Source # | |
Show a => Show (SortArg a) Source # | |
Generic (SortArg a) Source # | |
Eq a => Pretty (SortArg a) Source # | |
Defined in Language.ATS.PrettyPrint | |
NFData a => NFData (SortArg a) Source # | |
Defined in Language.ATS.Types | |
type Rep (SortArg a) Source # | |
Defined in Language.ATS.Types type Rep (SortArg a) = D1 (MetaData "SortArg" "Language.ATS.Types" "language-ats-1.7.6.1-BhewcS2tnMx7p4FPVrvPPG" False) (C1 (MetaCons "SortArg" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Sort a))) :+: C1 (MetaCons "Anonymous" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Sort a)))) |
A datatype for sorts.
NamedSort | |
T0p Addendum | t@ype |
Vt0p Addendum | vt@ype |
Addr | |
VType a Addendum |
|
View a Addendum | view |
TupleSort a (Sort a) (Sort a) | |
ArrowSort a (Sort a) (Sort a) |
Instances
Parser State
Lexical types
Instances
Instances
Eq AlexPosn Source # | |
Show AlexPosn Source # | |
Generic AlexPosn Source # | |
Pretty AlexPosn Source # | |
Defined in Language.ATS.Lexer | |
NFData AlexPosn Source # | |
Defined in Language.ATS.Lexer | |
type Rep AlexPosn Source # | |
Defined in Language.ATS.Lexer type Rep AlexPosn = D1 (MetaData "AlexPosn" "Language.ATS.Lexer" "language-ats-1.7.6.1-BhewcS2tnMx7p4FPVrvPPG" False) (C1 (MetaCons "AlexPn" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))) |
Instances
Error types
Expected AlexPosn String String | |
OneOf AlexPosn [String] String | |
Unknown Token | |
LexError String | |
Exhausted |
Instances
Lenses
preF :: Traversal' (Function a) (PreFunction Expression a) Source #
expression :: Lens' (PreFunction ek a) (Maybe (ek a)) Source #
fun :: Traversal' (Declaration a) (Function a) Source #
leaves :: Traversal' (Declaration a) (NonEmpty (Leaf a)) Source #
typeCallArgs :: Traversal' (Type a) [Type a] Source #
Misecellany
languageATSVersion :: Version Source #
Since: 1.7.4.0