| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Language.ATS
Contents
Description
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 :: [Arg a]
- _impl :: Implementation a
- | ProofImpl {
- implArgs :: [Arg a]
- _impl :: Implementation a
- | Val {
- add :: Addendum
- valT :: Maybe (Type a)
- valPat :: Pattern a
- _valExpression :: Expression a
- | StaVal [Universal a] String (Type a)
- | PrVal {
- prvalPat :: Pattern a
- _prValExpr :: Maybe (Expression a)
- prValType :: Maybe (Type a)
- | Var { }
- | AndDecl { }
- | Include String
- | Load { }
- | Stadef String (SortArgs a) (Either (StaticExpression a, Maybe (Sort 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) [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 (Expression a))
- | PropDef a String [Arg a] (Type a)
- | FixityDecl (Fixity a) [String]
- | MacDecl a String [String] (Expression a)
- | DataSort a String [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 Word
- | FloatLit Float
- | IntLit Int
- | 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 [(String, Expression a)] (Maybe (Type a))
- | Precede (Expression a) (Expression a)
- | ProofExpr a (Expression a) (Expression a)
- | TypeSignature (Expression a) (Type a)
- | WhereExp (Expression a) (ATS a)
- | TupleEx a [Expression a]
- | BoxTupleEx a [Expression a]
- | While 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)
- | ParenExpr a (Expression a)
- | CommentExpr String (Expression a)
- | MacroVar a String
- data Type a
- = Tuple a [Type a]
- | BoxTuple a [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)
- | AtType a (Type a)
- | ProofType a [Type a] (Type a)
- | ConcreteType (StaticExpression a)
- | RefType (Type a)
- | ViewType a (Type a)
- | FunctionType String (Type a) (Type a)
- | NoneType a
- | ImplicitType a
- | ViewLiteral Addendum
- | AnonymousRecord a [(String, Type a)]
- | ParenType a (Type a)
- | WhereType a (Type a) String (SortArgs a) (Type a)
- data Function a
- = Fun {
- _preF :: PreFunction a
- | Fn {
- _preF :: PreFunction a
- | Fnx {
- _preF :: PreFunction a
- | And {
- _preF :: PreFunction a
- | PrFun {
- _preF :: PreFunction a
- | PrFn {
- _preF :: PreFunction a
- | Praxi {
- _preF :: PreFunction a
- | CastFn {
- _preF :: PreFunction a
- = Fun {
- data Implementation a = Implement {
- pos :: a
- preUniversalsI :: [Universal a]
- implicits :: [[Type a]]
- universalsI :: [Universal a]
- nameI :: Name a
- iArgs :: [Arg a]
- _iExpression :: Either (StaticExpression a) (Expression a)
- data Pattern a
- = Wildcard 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] (Pattern a)
- | ExistentialPattern (Existential a) (Pattern a)
- | As 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
- | Full a String
- data Universal a = Universal {}
- data Existential a = Existential {}
- data PreFunction a = PreF {
- fname :: Name a
- sig :: Maybe String
- preUniversals :: [Universal a]
- universals :: [Universal a]
- args :: [Arg a]
- returnType :: Maybe (Type a)
- termetric :: Maybe (StaticExpression a)
- _expression :: Maybe (Expression a)
- data StaticExpression a
- = StaticVal (Name a)
- | StaticBinary (BinOp a) (StaticExpression a) (StaticExpression a)
- | StaticInt Int
- | SPrecede (StaticExpression a) (StaticExpression a)
- | StaticVoid a
- | Sif {
- scond :: StaticExpression a
- whenTrue :: StaticExpression a
- selseExpr :: StaticExpression a
- | SCall (Name a) [StaticExpression a]
- | SUnary (UnOp a) (StaticExpression a)
- | SLet a [Declaration a] (Maybe (StaticExpression a))
- | SCase Addendum (StaticExpression a) [(Pattern a, LambdaType a, 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 Fix = Either Int String
- type FixityState a = Map String (Fixity a)
- data Token
- = Identifier AlexPosn String
- | SpecialIdentifier AlexPosn String
- | Keyword AlexPosn Keyword
- | IntTok AlexPosn Int
- | 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 Word
- | 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
- | KwStadef
- | KwPraxi
- | KwWhile
- | 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
- | KwAddrAt
- | KwAddr
- | KwSta
- | KwAs
- | KwViewAt
- | KwViewdef
- | KwSymintr
- | KwAbsview
- | KwFn
- | KwInfix
- | KwInfixr
- | KwInfixl
- | KwStacst
- | KwListLit String
- | KwMacdef
- | KwDatasort
- | KwException
- data ATSError
- preF :: Lens' (Function a) (PreFunction a)
- expression :: Lens' (PreFunction a) (Maybe (Expression a))
- fun :: Traversal' (Declaration a) (Function a)
- leaves :: Traversal' (Declaration a) [Leaf a]
- constructorUniversals :: Lens' (Leaf a) [Universal a]
- typeCall :: Traversal' (Type a) (Name a)
- typeCallArgs :: Traversal' (Type a) [Type a]
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
Constructors
| ATS | |
Fields
| |
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) # | |
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.2.0.14-2m3t0tIn2g3A1MuK8G4EoI" 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.
Constructors
Instances
data Expression a Source #
A (possibly effectful) expression.
Constructors
Instances
A type for parsed ATS types
Constructors
| Tuple a [Type a] | |
| BoxTuple a [Type a] | |
| Named (Name a) | |
| Ex (Existential a) (Maybe (Type a)) | |
| ForA (Universal a) (Type a) | |
| Dependent | |
Fields
| |
| Unconsumed (Type a) | |
| AsProof (Type a) (Maybe (Type a)) | |
| FromVT (Type a) | |
| MaybeVal (Type a) | a?! |
| AtExpr a (Type a) (StaticExpression a) | a? |
| AtType a (Type a) | |
| ProofType a [Type a] (Type a) | |
| ConcreteType (StaticExpression a) | |
| RefType (Type a) | |
| ViewType a (Type a) | |
| FunctionType String (Type a) (Type a) | |
| NoneType a | |
| ImplicitType a | |
| ViewLiteral Addendum | |
| AnonymousRecord a [(String, Type a)] | |
| ParenType a (Type a) | |
| WhereType a (Type a) String (SortArgs a) (Type a) | |
Instances
A function declaration accounting for all keywords ATS uses to define them.
Constructors
| Fun | |
Fields
| |
| Fn | |
Fields
| |
| Fnx | |
Fields
| |
| And | |
Fields
| |
| PrFun | |
Fields
| |
| PrFn | |
Fields
| |
| Praxi | |
Fields
| |
| CastFn | |
Fields
| |
Instances
data Implementation a Source #
An implement or primplmnt declaration
Constructors
| Implement | |
Fields
| |
Instances
A data type for patterns.
Constructors
| Wildcard 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] (Pattern a) | |
| ExistentialPattern (Existential a) (Pattern a) | |
| As a (Pattern a) (Pattern a) |
Instances
Constructors
| 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) # | |
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.2.0.14-2m3t0tIn2g3A1MuK8G4EoI" False) (C1 (MetaCons "Negate" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "Deref" PrefixI False) (U1 :: * -> *) :+: 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
Constructors
| 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 #
Constructors
| DataPropLeaf | |
Fields
| |
Instances
Constructors
| Leaf | |
Fields
| |
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.2.0.14-2m3t0tIn2g3A1MuK8G4EoI" 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 #
Constructors
| 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) # | |
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.2.0.14-2m3t0tIn2g3A1MuK8G4EoI" 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))) :+: C1 (MetaCons "NoArgs" PrefixI False) (U1 :: * -> *))) | |
Determines the default behavior for incomplete pattern matches
data LambdaType a Source #
A type for =>, =<cloref1>, etc.
Constructors
| Plain a | |
| Spear a | |
| ProofArrow 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) # | |
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.2.0.14-2m3t0tIn2g3A1MuK8G4EoI" 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
Constructors
| Existential | |
Instances
data PreFunction a Source #
Constructors
| PreF | |
Fields
| |
Instances
data StaticExpression a Source #
Constructors
| StaticVal (Name a) | |
| StaticBinary (BinOp a) (StaticExpression a) (StaticExpression a) | |
| StaticInt Int | |
| SPrecede (StaticExpression a) (StaticExpression a) | |
| StaticVoid a | |
| Sif | |
Fields
| |
| SCall (Name a) [StaticExpression a] | |
| SUnary (UnOp a) (StaticExpression a) | |
| SLet a [Declaration a] (Maybe (StaticExpression a)) | |
| SCase Addendum (StaticExpression a) [(Pattern a, LambdaType a, StaticExpression a)] | |
Instances
data StackFunction a Source #
A type for stack-allocated functions. See here for more.
Constructors
| StackF | |
Fields
| |
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.2.0.14-2m3t0tIn2g3A1MuK8G4EoI" 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) # | |
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.2.0.14-2m3t0tIn2g3A1MuK8G4EoI" 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.
Constructors
| 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
Constructors
Instances
Instances
| Eq AlexPosn Source # | |
| Show AlexPosn Source # | |
| Generic AlexPosn # | |
| Pretty AlexPosn # | |
Defined in Language.ATS.Lexer | |
| NFData AlexPosn # | |
Defined in Language.ATS.Lexer | |
| type Rep AlexPosn # | |
Defined in Language.ATS.Lexer type Rep AlexPosn = D1 (MetaData "AlexPosn" "Language.ATS.Lexer" "language-ats-1.2.0.14-2m3t0tIn2g3A1MuK8G4EoI" 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)))) | |
Constructors
Instances
Error types
Constructors
| Expected AlexPosn String String | |
| OneOf AlexPosn [String] String | |
| Unknown Token | |
| LexError String |
Instances
Lenses
expression :: Lens' (PreFunction a) (Maybe (Expression a)) Source #
fun :: Traversal' (Declaration a) (Function a) Source #
leaves :: Traversal' (Declaration a) [Leaf a] Source #
typeCallArgs :: Traversal' (Type a) [Type a] Source #