language-ats-1.2.0.2: Parser and pretty-printer for ATS.

Safe HaskellNone
LanguageHaskell2010

Language.ATS

Contents

Description

Main module for the library

Synopsis

Functions for working with syntax

lexATS :: String -> Either String [Token] Source #

This function turns a string into a stream of tokens for the parser.

parse :: String -> Either ATSError (ATS AlexPosn) Source #

Parse a string containing ATS source.

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.

printATS :: Eq a => ATS a -> String Source #

Pretty-print with sensible defaults.

printATSCustom Source #

Arguments

:: Eq a 
=> Float

Ribbon fraction

-> Int

Ribbon width

-> ATS a 
-> String 

printATSFast :: Eq a => ATS a -> String Source #

Slightly faster pretty-printer without indendation (for code generation).

printErr :: MonadIO m => ATSError -> m () Source #

Print an error message to standard error.

warnErr :: MonadIO m => FilePath -> ATSError -> m () Source #

Same as printErr, but print a yellow warning message instead.

Library functions

getDependencies :: ATS a -> [FilePath] Source #

Extract a list of files that some code depends on.

Syntax Tree

newtype ATS a Source #

Newtype wrapper containing a list of declarations

Constructors

ATS 

Fields

Instances

Eq a => Eq (ATS a) Source # 

Methods

(==) :: ATS a -> ATS a -> Bool #

(/=) :: ATS a -> ATS a -> Bool #

Show a => Show (ATS a) Source # 

Methods

showsPrec :: Int -> ATS a -> ShowS #

show :: ATS a -> String #

showList :: [ATS a] -> ShowS #

Generic (ATS a) Source # 

Associated Types

type Rep (ATS a) :: * -> * #

Methods

from :: ATS a -> Rep (ATS a) x #

to :: Rep (ATS a) x -> ATS a #

Semigroup (ATS a) Source # 

Methods

(<>) :: ATS a -> ATS a -> ATS a #

sconcat :: NonEmpty (ATS a) -> ATS a #

stimes :: Integral b => b -> ATS a -> ATS a #

Monoid (ATS a) Source # 

Methods

mempty :: ATS a #

mappend :: ATS a -> ATS a -> ATS a #

mconcat :: [ATS a] -> ATS a #

NFData a => NFData (ATS a) Source # 

Methods

rnf :: ATS a -> () #

type Rep (ATS a) Source # 
type Rep (ATS a) = D1 * (MetaData "ATS" "Language.ATS.Types" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" True) (C1 * (MetaCons "ATS" PrefixI True) (S1 * (MetaSel (Just Symbol "unATS") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Declaration a])))

data Declaration a Source #

Declare something in a scope (a function, value, action, etc.)

Constructors

Func 

Fields

Impl 

Fields

ProofImpl 

Fields

Val 
StaVal [Universal a] String (Type a) 
PrVal 
Var 
AndDecl 

Fields

Include String 
Load 
Stadef String (SortArgs a) (Either (StaticExpression a) (Type a)) 
CBlock String 
TypeDef a String (SortArgs a) (Type a) 
ViewTypeDef a String (SortArgs a) (Type a) 
SumType 

Fields

SumViewType 

Fields

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 

Fields

DataProp 
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) [Arg 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) 

Instances

Eq a => Eq (Declaration a) Source # 
Show a => Show (Declaration a) Source # 
Generic (Declaration a) Source # 

Associated Types

type Rep (Declaration a) :: * -> * #

Methods

from :: Declaration a -> Rep (Declaration a) x #

to :: Rep (Declaration a) x -> Declaration a #

NFData a => NFData (Declaration a) Source # 

Methods

rnf :: Declaration a -> () #

type Rep (Declaration a) Source # 
type Rep (Declaration a) = D1 * (MetaData "Declaration" "Language.ATS.Types" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) ((:+:) * ((:+:) * ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "Func" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "pos") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Just Symbol "_fun") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Function a))))) (C1 * (MetaCons "Impl" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "implArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Arg a])) (S1 * (MetaSel (Just Symbol "_impl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Implementation a)))))) ((:+:) * (C1 * (MetaCons "ProofImpl" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "implArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Arg a])) (S1 * (MetaSel (Just Symbol "_impl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Implementation a))))) ((:+:) * (C1 * (MetaCons "Val" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "add") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum)) (S1 * (MetaSel (Just Symbol "valT") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Type a))))) ((:*:) * (S1 * (MetaSel (Just Symbol "valPat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Pattern a))) (S1 * (MetaSel (Just Symbol "_valExpression") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a)))))) (C1 * (MetaCons "StaVal" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Universal a])) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))))))))) ((:+:) * ((:+:) * (C1 * (MetaCons "PrVal" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "prvalPat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Pattern a))) ((:*:) * (S1 * (MetaSel (Just Symbol "_prValExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Expression a)))) (S1 * (MetaSel (Just Symbol "prValType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Type a))))))) (C1 * (MetaCons "Var" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "varT") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Type a)))) (S1 * (MetaSel (Just Symbol "varPat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Pattern a)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_varExpr1") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Expression a)))) (S1 * (MetaSel (Just Symbol "_varExpr2") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Expression a)))))))) ((:+:) * (C1 * (MetaCons "AndDecl" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "andT") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Type a)))) ((:*:) * (S1 * (MetaSel (Just Symbol "andPat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Pattern a))) (S1 * (MetaSel (Just Symbol "_andExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a)))))) ((:+:) * (C1 * (MetaCons "Include" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) (C1 * (MetaCons "Load" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "static") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "withOctothorpe") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "qualName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe String))) (S1 * (MetaSel (Just Symbol "fileName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))))))))) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "Stadef" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SortArgs a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Either (StaticExpression a) (Type a))))))) (C1 * (MetaCons "CBlock" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) ((:+:) * (C1 * (MetaCons "TypeDef" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SortArgs a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a)))))) ((:+:) * (C1 * (MetaCons "ViewTypeDef" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SortArgs a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a)))))) (C1 * (MetaCons "SumType" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "typeName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) ((:*:) * (S1 * (MetaSel (Just Symbol "typeArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SortArgs a))) (S1 * (MetaSel (Just Symbol "_leaves") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Leaf a])))))))) ((:+:) * ((:+:) * (C1 * (MetaCons "SumViewType" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "typeName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) ((:*:) * (S1 * (MetaSel (Just Symbol "typeArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SortArgs a))) (S1 * (MetaSel (Just Symbol "_leaves") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Leaf a]))))) ((:+:) * (C1 * (MetaCons "AbsType" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SortArgs a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Type a))))))) (C1 * (MetaCons "AbsViewType" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SortArgs a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Type a))))))))) ((:+:) * (C1 * (MetaCons "AbsView" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SortArgs a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Type a))))))) ((:+:) * (C1 * (MetaCons "AbsVT0p" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SortArgs a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Type a))))))) (C1 * (MetaCons "AbsT0p" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SortArgs a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Type a)))))))))))) ((:+:) * ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "ViewDef" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SortArgs a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a)))))) (C1 * (MetaCons "OverloadOp" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (BinOp a)))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Name a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Int))))))) ((:+:) * (C1 * (MetaCons "OverloadIdent" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Name a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Int)))))) ((:+:) * (C1 * (MetaCons "Comment" PrefixI True) (S1 * (MetaSel (Just Symbol "_comment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) (C1 * (MetaCons "DataProp" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "pos") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Just Symbol "propName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Just Symbol "propArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SortArgs a))) (S1 * (MetaSel (Just Symbol "_propLeaves") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [DataPropLeaf a])))))))) ((:+:) * ((:+:) * (C1 * (MetaCons "DataView" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SortArgs a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Leaf a]))))) ((:+:) * (C1 * (MetaCons "Extern" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Declaration a))))) (C1 * (MetaCons "Define" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))))) ((:+:) * (C1 * (MetaCons "SortDef" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Either (Sort a) (Universal a))))))) ((:+:) * (C1 * (MetaCons "AndD" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Declaration a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Declaration a))))) (C1 * (MetaCons "Local" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (ATS a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (ATS a)))))))))) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "AbsProp" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Arg a]))))) (C1 * (MetaCons "Assume" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Name a))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Arg a])) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))))))) ((:+:) * (C1 * (MetaCons "TKind" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Name a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))))) ((:+:) * (C1 * (MetaCons "SymIntr" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Name a])))) (C1 * (MetaCons "Stacst" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Name a)))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Expression a)))))))))) ((:+:) * ((:+:) * (C1 * (MetaCons "PropDef" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Arg a])) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a)))))) ((:+:) * (C1 * (MetaCons "FixityDecl" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Fixity a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [String])))) (C1 * (MetaCons "MacDecl" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [String])) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a)))))))) ((:+:) * (C1 * (MetaCons "DataSort" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [DataSortLeaf a]))))) ((:+:) * (C1 * (MetaCons "Exception" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))))) (C1 * (MetaCons "ExtVar" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))))))))))))

data Expression a Source #

A (possibly effectful) expression.

Constructors

Let a (ATS a) (Maybe (Expression a)) 
VoidLiteral a

The '()' literal representing inaction.

Call 

Fields

NamedVal (Name a) 
ListLiteral a String (Type a) [Expression a] 
If 

Fields

UintLit Word
1000u
FloatLit Float 
IntLit Int 
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 

Fields

Case 

Fields

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] 
While a (Expression a) (Expression a) 
Actions (ATS a) 
Begin a (Expression a) 
BinList 

Fields

PrecedeList 

Fields

FixAt a String (StackFunction a) 
LambdaAt a (StackFunction a) 
ParenExpr a (Expression a) 
CommentExpr String (Expression a) 
MacroVar a String 

Instances

Eq a => Eq (Expression a) Source # 

Methods

(==) :: Expression a -> Expression a -> Bool #

(/=) :: Expression a -> Expression a -> Bool #

Show a => Show (Expression a) Source # 
Generic (Expression a) Source # 

Associated Types

type Rep (Expression a) :: * -> * #

Methods

from :: Expression a -> Rep (Expression a) x #

to :: Rep (Expression a) x -> Expression a #

NFData a => NFData (Expression a) Source # 

Methods

rnf :: Expression a -> () #

Recursive (Expression a) Source # 

Methods

project :: Expression a -> Base (Expression a) (Expression a) #

cata :: (Base (Expression a) a -> a) -> Expression a -> a #

para :: (Base (Expression a) (Expression a, a) -> a) -> Expression a -> a #

gpara :: (Corecursive (Expression a), Comonad w) => (forall b. Base (Expression a) (w b) -> w (Base (Expression a) b)) -> (Base (Expression a) (EnvT (Expression a) w a) -> a) -> Expression a -> a #

prepro :: Corecursive (Expression a) => (forall b. Base (Expression a) b -> Base (Expression a) b) -> (Base (Expression a) a -> a) -> Expression a -> a #

gprepro :: (Corecursive (Expression a), Comonad w) => (forall b. Base (Expression a) (w b) -> w (Base (Expression a) b)) -> (forall c. Base (Expression a) c -> Base (Expression a) c) -> (Base (Expression a) (w a) -> a) -> Expression a -> a #

Corecursive (Expression a) Source # 

Methods

embed :: Base (Expression a) (Expression a) -> Expression a #

ana :: (a -> Base (Expression a) a) -> a -> Expression a #

apo :: (a -> Base (Expression a) (Either (Expression a) a)) -> a -> Expression a #

postpro :: Recursive (Expression a) => (forall b. Base (Expression a) b -> Base (Expression a) b) -> (a -> Base (Expression a) a) -> a -> Expression a #

gpostpro :: (Recursive (Expression a), Monad m) => (forall b. m (Base (Expression a) b) -> Base (Expression a) (m b)) -> (forall c. Base (Expression a) c -> Base (Expression a) c) -> (a -> Base (Expression a) (m a)) -> a -> Expression a #

type Rep (Expression a) Source # 
type Rep (Expression a) = D1 * (MetaData "Expression" "Language.ATS.Types" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) ((:+:) * ((:+:) * ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "Let" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (ATS a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Expression a))))))) (C1 * (MetaCons "VoidLiteral" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)))) ((:+:) * (C1 * (MetaCons "Call" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "callName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Name a))) (S1 * (MetaSel (Just Symbol "callImplicits") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [[Type a]]))) ((:*:) * (S1 * (MetaSel (Just Symbol "callUniversals") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Type a])) ((:*:) * (S1 * (MetaSel (Just Symbol "callProofs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe [Expression a]))) (S1 * (MetaSel (Just Symbol "callArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Expression a])))))) (C1 * (MetaCons "NamedVal" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Name a)))))) ((:+:) * ((:+:) * (C1 * (MetaCons "ListLiteral" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Expression a]))))) (C1 * (MetaCons "If" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "cond") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))) ((:*:) * (S1 * (MetaSel (Just Symbol "whenTrue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))) (S1 * (MetaSel (Just Symbol "elseExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Expression a)))))))) ((:+:) * (C1 * (MetaCons "UintLit" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Word))) ((:+:) * (C1 * (MetaCons "FloatLit" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Float))) (C1 * (MetaCons "IntLit" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Int))))))) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "UnderscoreLit" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a))) (C1 * (MetaCons "Lambda" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (LambdaType a)))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Pattern a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))))))) ((:+:) * (C1 * (MetaCons "LinearLambda" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (LambdaType a)))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Pattern a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a)))))) ((:+:) * (C1 * (MetaCons "Index" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Name a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a)))))) (C1 * (MetaCons "Access" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Name a))))))))) ((:+:) * ((:+:) * (C1 * (MetaCons "StringLit" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) (C1 * (MetaCons "CharLit" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Char)))) ((:+:) * (C1 * (MetaCons "AddrAt" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))))) ((:+:) * (C1 * (MetaCons "ViewAt" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))))) (C1 * (MetaCons "Binary" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (BinOp a))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))))))))))) ((:+:) * ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "Unary" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (UnOp a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))))) (C1 * (MetaCons "IfCase" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "posE") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Just Symbol "ifArms") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [(Expression a, LambdaType a, Expression a)]))))) ((:+:) * (C1 * (MetaCons "Case" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "posE") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Just Symbol "kind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum))) ((:*:) * (S1 * (MetaSel (Just Symbol "val") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))) (S1 * (MetaSel (Just Symbol "_arms") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [(Pattern a, LambdaType a, Expression a)]))))) (C1 * (MetaCons "RecordValue" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [(String, Expression a)])) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Type a))))))))) ((:+:) * ((:+:) * (C1 * (MetaCons "Precede" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))))) (C1 * (MetaCons "ProofExpr" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))))))) ((:+:) * (C1 * (MetaCons "TypeSignature" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))))) ((:+:) * (C1 * (MetaCons "WhereExp" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (ATS a))))) (C1 * (MetaCons "TupleEx" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Expression a])))))))) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "While" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a)))))) (C1 * (MetaCons "Actions" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (ATS a))))) ((:+:) * (C1 * (MetaCons "Begin" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))))) ((:+:) * (C1 * (MetaCons "BinList" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_op") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (BinOp a))) (S1 * (MetaSel (Just Symbol "_exprs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Expression a])))) (C1 * (MetaCons "PrecedeList" PrefixI True) (S1 * (MetaSel (Just Symbol "_exprs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Expression a])))))) ((:+:) * ((:+:) * (C1 * (MetaCons "FixAt" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (StackFunction a)))))) (C1 * (MetaCons "LambdaAt" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (StackFunction a)))))) ((:+:) * (C1 * (MetaCons "ParenExpr" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))))) ((:+:) * (C1 * (MetaCons "CommentExpr" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))))) (C1 * (MetaCons "MacroVar" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))))))))))
type Base (Expression a) Source # 
type Base (Expression a)

data Type a Source #

A type for parsed ATS types

Instances

Eq a => Eq (Type a) Source # 

Methods

(==) :: Type a -> Type a -> Bool #

(/=) :: Type a -> Type a -> Bool #

Show a => Show (Type a) Source # 

Methods

showsPrec :: Int -> Type a -> ShowS #

show :: Type a -> String #

showList :: [Type a] -> ShowS #

Generic (Type a) Source # 

Associated Types

type Rep (Type a) :: * -> * #

Methods

from :: Type a -> Rep (Type a) x #

to :: Rep (Type a) x -> Type a #

NFData a => NFData (Type a) Source # 

Methods

rnf :: Type a -> () #

Recursive (Type a) Source # 

Methods

project :: Type a -> Base (Type a) (Type a) #

cata :: (Base (Type a) a -> a) -> Type a -> a #

para :: (Base (Type a) (Type a, a) -> a) -> Type a -> a #

gpara :: (Corecursive (Type a), Comonad w) => (forall b. Base (Type a) (w b) -> w (Base (Type a) b)) -> (Base (Type a) (EnvT (Type a) w a) -> a) -> Type a -> a #

prepro :: Corecursive (Type a) => (forall b. Base (Type a) b -> Base (Type a) b) -> (Base (Type a) a -> a) -> Type a -> a #

gprepro :: (Corecursive (Type a), Comonad w) => (forall b. Base (Type a) (w b) -> w (Base (Type a) b)) -> (forall c. Base (Type a) c -> Base (Type a) c) -> (Base (Type a) (w a) -> a) -> Type a -> a #

Corecursive (Type a) Source # 

Methods

embed :: Base (Type a) (Type a) -> Type a #

ana :: (a -> Base (Type a) a) -> a -> Type a #

apo :: (a -> Base (Type a) (Either (Type a) a)) -> a -> Type a #

postpro :: Recursive (Type a) => (forall b. Base (Type a) b -> Base (Type a) b) -> (a -> Base (Type a) a) -> a -> Type a #

gpostpro :: (Recursive (Type a), Monad m) => (forall b. m (Base (Type a) b) -> Base (Type a) (m b)) -> (forall c. Base (Type a) c -> Base (Type a) c) -> (a -> Base (Type a) (m a)) -> a -> Type a #

type Rep (Type a) Source # 
type Rep (Type a) = D1 * (MetaData "Type" "Language.ATS.Types" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) ((:+:) * ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "Tuple" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Type a])))) (C1 * (MetaCons "Named" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Name a))))) ((:+:) * (C1 * (MetaCons "Ex" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Existential a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Type a)))))) ((:+:) * (C1 * (MetaCons "ForA" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Universal a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))))) (C1 * (MetaCons "Dependent" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_typeCall") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Name a))) (S1 * (MetaSel (Just Symbol "_typeCallArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Type a]))))))) ((:+:) * ((:+:) * (C1 * (MetaCons "Unconsumed" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a)))) ((:+:) * (C1 * (MetaCons "AsProof" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Type a)))))) (C1 * (MetaCons "FromVT" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a)))))) ((:+:) * (C1 * (MetaCons "MaybeVal" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a)))) ((:+:) * (C1 * (MetaCons "AtExpr" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (StaticExpression a)))))) (C1 * (MetaCons "AtType" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))))))))) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "ProofType" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Type a])) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a)))))) (C1 * (MetaCons "ConcreteType" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (StaticExpression a))))) ((:+:) * (C1 * (MetaCons "RefType" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a)))) ((:+:) * (C1 * (MetaCons "ViewType" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))))) (C1 * (MetaCons "FunctionType" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))))))))) ((:+:) * ((:+:) * (C1 * (MetaCons "NoneType" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a))) ((:+:) * (C1 * (MetaCons "ImplicitType" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a))) (C1 * (MetaCons "ViewLiteral" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum))))) ((:+:) * (C1 * (MetaCons "AnonymousRecord" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [(String, Type a)])))) ((:+:) * (C1 * (MetaCons "ParenType" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))))) (C1 * (MetaCons "WhereType" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a)))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (SortArgs a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))))))))))))
type Base (Type a) Source # 
type Base (Type a)

data Function a Source #

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

Eq a => Eq (Function a) Source # 

Methods

(==) :: Function a -> Function a -> Bool #

(/=) :: Function a -> Function a -> Bool #

Show a => Show (Function a) Source # 

Methods

showsPrec :: Int -> Function a -> ShowS #

show :: Function a -> String #

showList :: [Function a] -> ShowS #

Generic (Function a) Source # 

Associated Types

type Rep (Function a) :: * -> * #

Methods

from :: Function a -> Rep (Function a) x #

to :: Rep (Function a) x -> Function a #

NFData a => NFData (Function a) Source # 

Methods

rnf :: Function a -> () #

type Rep (Function a) Source # 

data Implementation a Source #

An implement or primplmnt declaration

Constructors

Implement 

Fields

Instances

Eq a => Eq (Implementation a) Source # 
Show a => Show (Implementation a) Source # 
Generic (Implementation a) Source # 

Associated Types

type Rep (Implementation a) :: * -> * #

NFData a => NFData (Implementation a) Source # 

Methods

rnf :: Implementation a -> () #

type Rep (Implementation a) Source # 

data Pattern a Source #

A data type for patterns.

Instances

Eq a => Eq (Pattern a) Source # 

Methods

(==) :: Pattern a -> Pattern a -> Bool #

(/=) :: Pattern a -> Pattern a -> Bool #

Show a => Show (Pattern a) Source # 

Methods

showsPrec :: Int -> Pattern a -> ShowS #

show :: Pattern a -> String #

showList :: [Pattern a] -> ShowS #

Generic (Pattern a) Source # 

Associated Types

type Rep (Pattern a) :: * -> * #

Methods

from :: Pattern a -> Rep (Pattern a) x #

to :: Rep (Pattern a) x -> Pattern a #

NFData a => NFData (Pattern a) Source # 

Methods

rnf :: Pattern a -> () #

Recursive (Pattern a) Source # 

Methods

project :: Pattern a -> Base (Pattern a) (Pattern a) #

cata :: (Base (Pattern a) a -> a) -> Pattern a -> a #

para :: (Base (Pattern a) (Pattern a, a) -> a) -> Pattern a -> a #

gpara :: (Corecursive (Pattern a), Comonad w) => (forall b. Base (Pattern a) (w b) -> w (Base (Pattern a) b)) -> (Base (Pattern a) (EnvT (Pattern a) w a) -> a) -> Pattern a -> a #

prepro :: Corecursive (Pattern a) => (forall b. Base (Pattern a) b -> Base (Pattern a) b) -> (Base (Pattern a) a -> a) -> Pattern a -> a #

gprepro :: (Corecursive (Pattern a), Comonad w) => (forall b. Base (Pattern a) (w b) -> w (Base (Pattern a) b)) -> (forall c. Base (Pattern a) c -> Base (Pattern a) c) -> (Base (Pattern a) (w a) -> a) -> Pattern a -> a #

Corecursive (Pattern a) Source # 

Methods

embed :: Base (Pattern a) (Pattern a) -> Pattern a #

ana :: (a -> Base (Pattern a) a) -> a -> Pattern a #

apo :: (a -> Base (Pattern a) (Either (Pattern a) a)) -> a -> Pattern a #

postpro :: Recursive (Pattern a) => (forall b. Base (Pattern a) b -> Base (Pattern a) b) -> (a -> Base (Pattern a) a) -> a -> Pattern a #

gpostpro :: (Recursive (Pattern a), Monad m) => (forall b. m (Base (Pattern a) b) -> Base (Pattern a) (m b)) -> (forall c. Base (Pattern a) c -> Base (Pattern a) c) -> (a -> Base (Pattern a) (m a)) -> a -> Pattern a #

type Rep (Pattern a) Source # 
type Rep (Pattern a) = D1 * (MetaData "Pattern" "Language.ATS.Types" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "Wildcard" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a))) (C1 * (MetaCons "PName" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Name a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Pattern a]))))) ((:+:) * (C1 * (MetaCons "PSum" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Pattern a))))) ((:+:) * (C1 * (MetaCons "PLiteral" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a)))) (C1 * (MetaCons "Guarded" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Pattern a))))))))) ((:+:) * ((:+:) * (C1 * (MetaCons "Free" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Pattern a)))) ((:+:) * (C1 * (MetaCons "Proof" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Pattern a])) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Pattern a]))))) (C1 * (MetaCons "TuplePattern" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Pattern a]))))) ((:+:) * (C1 * (MetaCons "AtPattern" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Pattern a))))) ((:+:) * (C1 * (MetaCons "UniversalPattern" PrefixI False) ((:*:) * ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Universal a])) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Pattern a)))))) (C1 * (MetaCons "ExistentialPattern" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Existential a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Pattern a)))))))))
type Base (Pattern a) Source # 
type Base (Pattern a)

data Name a Source #

Constructors

Unqualified String 
Qualified a String String

A name can be qualified e.g. $UN.unsafefn

SpecialName a String

A name for builtin functions such as $showtype.

Functorial String String 
FieldName a String String 

Instances

Eq a => Eq (Name a) Source # 

Methods

(==) :: Name a -> Name a -> Bool #

(/=) :: Name a -> Name a -> Bool #

Show a => Show (Name a) Source # 

Methods

showsPrec :: Int -> Name a -> ShowS #

show :: Name a -> String #

showList :: [Name a] -> ShowS #

Generic (Name a) Source # 

Associated Types

type Rep (Name a) :: * -> * #

Methods

from :: Name a -> Rep (Name a) x #

to :: Rep (Name a) x -> Name a #

NFData a => NFData (Name a) Source # 

Methods

rnf :: Name a -> () #

type Rep (Name a) Source # 
type Rep (Name a) = D1 * (MetaData "Name" "Language.ATS.Types" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) ((:+:) * ((:+:) * (C1 * (MetaCons "Unqualified" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) (C1 * (MetaCons "Qualified" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))))) ((:+:) * (C1 * (MetaCons "SpecialName" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) ((:+:) * (C1 * (MetaCons "Functorial" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) (C1 * (MetaCons "FieldName" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))))))))

data UnOp a Source #

~ is used to negate numbers in ATS

Constructors

Negate 
Deref 
SpecialOp a String 

Instances

Eq a => Eq (UnOp a) Source # 

Methods

(==) :: UnOp a -> UnOp a -> Bool #

(/=) :: UnOp a -> UnOp a -> Bool #

Show a => Show (UnOp a) Source # 

Methods

showsPrec :: Int -> UnOp a -> ShowS #

show :: UnOp a -> String #

showList :: [UnOp a] -> ShowS #

Generic (UnOp a) Source # 

Associated Types

type Rep (UnOp a) :: * -> * #

Methods

from :: UnOp a -> Rep (UnOp a) x #

to :: Rep (UnOp a) x -> UnOp a #

NFData a => NFData (UnOp a) Source # 

Methods

rnf :: UnOp a -> () #

type Rep (UnOp a) Source # 
type Rep (UnOp a) = D1 * (MetaData "UnOp" "Language.ATS.Types" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) ((:+:) * (C1 * (MetaCons "Negate" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "Deref" PrefixI False) (U1 *)) (C1 * (MetaCons "SpecialOp" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))))))

data BinOp a Source #

Binary operators on expressions

Instances

Eq a => Eq (BinOp a) Source # 

Methods

(==) :: BinOp a -> BinOp a -> Bool #

(/=) :: BinOp a -> BinOp a -> Bool #

Show a => Show (BinOp a) Source # 

Methods

showsPrec :: Int -> BinOp a -> ShowS #

show :: BinOp a -> String #

showList :: [BinOp a] -> ShowS #

Generic (BinOp a) Source # 

Associated Types

type Rep (BinOp a) :: * -> * #

Methods

from :: BinOp a -> Rep (BinOp a) x #

to :: Rep (BinOp a) x -> BinOp a #

NFData a => NFData (BinOp a) Source # 

Methods

rnf :: BinOp a -> () #

type Rep (BinOp a) Source # 
type Rep (BinOp a) = D1 * (MetaData "BinOp" "Language.ATS.Types" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) ((:+:) * ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "Add" PrefixI False) (U1 *)) (C1 * (MetaCons "Mult" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "Div" PrefixI False) (U1 *)) (C1 * (MetaCons "Sub" PrefixI False) (U1 *)))) ((:+:) * ((:+:) * (C1 * (MetaCons "GreaterThan" PrefixI False) (U1 *)) (C1 * (MetaCons "GreaterThanEq" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "LessThan" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "LessThanEq" PrefixI False) (U1 *)) (C1 * (MetaCons "Equal" PrefixI False) (U1 *)))))) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "LogicalAnd" PrefixI False) (U1 *)) (C1 * (MetaCons "LogicalOr" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "StaticEq" PrefixI False) (U1 *)) (C1 * (MetaCons "Mod" PrefixI False) (U1 *)))) ((:+:) * ((:+:) * (C1 * (MetaCons "NotEq" PrefixI False) (U1 *)) (C1 * (MetaCons "Mutate" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "At" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "SpearOp" PrefixI False) (U1 *)) (C1 * (MetaCons "SpecialInfix" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))))))))

data DataPropLeaf a Source #

Constructors

DataPropLeaf 

Instances

Eq a => Eq (DataPropLeaf a) Source # 
Show a => Show (DataPropLeaf a) Source # 
Generic (DataPropLeaf a) Source # 

Associated Types

type Rep (DataPropLeaf a) :: * -> * #

Methods

from :: DataPropLeaf a -> Rep (DataPropLeaf a) x #

to :: Rep (DataPropLeaf a) x -> DataPropLeaf a #

NFData a => NFData (DataPropLeaf a) Source # 

Methods

rnf :: DataPropLeaf a -> () #

type Rep (DataPropLeaf a) Source # 
type Rep (DataPropLeaf a) = D1 * (MetaData "DataPropLeaf" "Language.ATS.Types" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) (C1 * (MetaCons "DataPropLeaf" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "propU") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Universal a])) ((:*:) * (S1 * (MetaSel (Just Symbol "_propExpr1") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))) (S1 * (MetaSel (Just Symbol "_propExpr2") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Expression a)))))))

data Leaf a Source #

Instances

Eq a => Eq (Leaf a) Source # 

Methods

(==) :: Leaf a -> Leaf a -> Bool #

(/=) :: Leaf a -> Leaf a -> Bool #

Show a => Show (Leaf a) Source # 

Methods

showsPrec :: Int -> Leaf a -> ShowS #

show :: Leaf a -> String #

showList :: [Leaf a] -> ShowS #

Generic (Leaf a) Source # 

Associated Types

type Rep (Leaf a) :: * -> * #

Methods

from :: Leaf a -> Rep (Leaf a) x #

to :: Rep (Leaf a) x -> Leaf a #

NFData a => NFData (Leaf a) Source # 

Methods

rnf :: Leaf a -> () #

type Rep (Leaf a) Source # 
type Rep (Leaf a) = D1 * (MetaData "Leaf" "Language.ATS.Types" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) (C1 * (MetaCons "Leaf" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_constructorUniversals") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Universal a])) (S1 * (MetaSel (Just Symbol "name") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:*:) * (S1 * (MetaSel (Just Symbol "constructorArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [StaticExpression a])) (S1 * (MetaSel (Just Symbol "maybeType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Type a)))))))

data DataSortLeaf a Source #

Constructors

DataSortLeaf [Universal a] (Sort a) (Maybe (Sort a)) 

Instances

Eq a => Eq (DataSortLeaf a) Source # 
Show a => Show (DataSortLeaf a) Source # 
Generic (DataSortLeaf a) Source # 

Associated Types

type Rep (DataSortLeaf a) :: * -> * #

Methods

from :: DataSortLeaf a -> Rep (DataSortLeaf a) x #

to :: Rep (DataSortLeaf a) x -> DataSortLeaf a #

NFData a => NFData (DataSortLeaf a) Source # 

Methods

rnf :: DataSortLeaf a -> () #

type Rep (DataSortLeaf a) Source # 

data Arg a Source #

An argument to a function.

Constructors

Arg (Paired String (Type a)) 
PrfArg [Arg a] (Arg a) 
NoArgs 

Instances

Eq a => Eq (Arg a) Source # 

Methods

(==) :: Arg a -> Arg a -> Bool #

(/=) :: Arg a -> Arg a -> Bool #

Show a => Show (Arg a) Source # 

Methods

showsPrec :: Int -> Arg a -> ShowS #

show :: Arg a -> String #

showList :: [Arg a] -> ShowS #

Generic (Arg a) Source # 

Associated Types

type Rep (Arg a) :: * -> * #

Methods

from :: Arg a -> Rep (Arg a) x #

to :: Rep (Arg a) x -> Arg a #

NFData a => NFData (Arg a) Source # 

Methods

rnf :: Arg a -> () #

type Rep (Arg a) Source # 

data Addendum Source #

Determines the default behavior for incomplete pattern matches

Constructors

None 
Plus 
Minus 

Instances

Eq Addendum Source # 
Show Addendum Source # 
Generic Addendum Source # 

Associated Types

type Rep Addendum :: * -> * #

Methods

from :: Addendum -> Rep Addendum x #

to :: Rep Addendum x -> Addendum #

Pretty Addendum Source # 

Methods

pretty :: Addendum -> Doc #

prettyList :: [Addendum] -> Doc #

NFData Addendum Source # 

Methods

rnf :: Addendum -> () #

type Rep Addendum # 
type Rep Addendum = D1 * (MetaData "Addendum" "Language.ATS.Lexer" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) ((:+:) * (C1 * (MetaCons "None" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "Plus" PrefixI False) (U1 *)) (C1 * (MetaCons "Minus" PrefixI False) (U1 *))))

data LambdaType a Source #

A type for =>, =<cloref1>, etc.

Constructors

Plain a 
Full a String 
Spear a 

data Universal a Source #

Wrapper for universal quantifiers (refinement types)

Constructors

Universal 

Fields

Instances

Eq a => Eq (Universal a) Source # 

Methods

(==) :: Universal a -> Universal a -> Bool #

(/=) :: Universal a -> Universal a -> Bool #

Show a => Show (Universal a) Source # 
Generic (Universal a) Source # 

Associated Types

type Rep (Universal a) :: * -> * #

Methods

from :: Universal a -> Rep (Universal a) x #

to :: Rep (Universal a) x -> Universal a #

NFData a => NFData (Universal a) Source # 

Methods

rnf :: Universal a -> () #

type Rep (Universal a) Source # 
type Rep (Universal a) = D1 * (MetaData "Universal" "Language.ATS.Types" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) (C1 * (MetaCons "Universal" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "bound") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [String])) ((:*:) * (S1 * (MetaSel (Just Symbol "typeU") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (Sort a)))) (S1 * (MetaSel (Just Symbol "prop") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [StaticExpression a])))))

data Existential a Source #

Wrapper for existential quantifiers/types

Constructors

Existential 

Fields

Instances

Eq a => Eq (Existential a) Source # 
Show a => Show (Existential a) Source # 
Generic (Existential a) Source # 

Associated Types

type Rep (Existential a) :: * -> * #

Methods

from :: Existential a -> Rep (Existential a) x #

to :: Rep (Existential a) x -> Existential a #

NFData a => NFData (Existential a) Source # 

Methods

rnf :: Existential a -> () #

type Rep (Existential a) Source # 

data PreFunction a Source #

Constructors

PreF 

Fields

Instances

Eq a => Eq (PreFunction a) Source # 
Show a => Show (PreFunction a) Source # 
Generic (PreFunction a) Source # 

Associated Types

type Rep (PreFunction a) :: * -> * #

Methods

from :: PreFunction a -> Rep (PreFunction a) x #

to :: Rep (PreFunction a) x -> PreFunction a #

NFData a => NFData (PreFunction a) Source # 

Methods

rnf :: PreFunction a -> () #

type Rep (PreFunction a) Source # 

data StaticExpression a Source #

Instances

Eq a => Eq (StaticExpression a) Source # 
Show a => Show (StaticExpression a) Source # 
Generic (StaticExpression a) Source # 

Associated Types

type Rep (StaticExpression a) :: * -> * #

NFData a => NFData (StaticExpression a) Source # 

Methods

rnf :: StaticExpression a -> () #

Recursive (StaticExpression a) Source # 

Methods

project :: StaticExpression a -> Base (StaticExpression a) (StaticExpression a) #

cata :: (Base (StaticExpression a) a -> a) -> StaticExpression a -> a #

para :: (Base (StaticExpression a) (StaticExpression a, a) -> a) -> StaticExpression a -> a #

gpara :: (Corecursive (StaticExpression a), Comonad w) => (forall b. Base (StaticExpression a) (w b) -> w (Base (StaticExpression a) b)) -> (Base (StaticExpression a) (EnvT (StaticExpression a) w a) -> a) -> StaticExpression a -> a #

prepro :: Corecursive (StaticExpression a) => (forall b. Base (StaticExpression a) b -> Base (StaticExpression a) b) -> (Base (StaticExpression a) a -> a) -> StaticExpression a -> a #

gprepro :: (Corecursive (StaticExpression a), Comonad w) => (forall b. Base (StaticExpression a) (w b) -> w (Base (StaticExpression a) b)) -> (forall c. Base (StaticExpression a) c -> Base (StaticExpression a) c) -> (Base (StaticExpression a) (w a) -> a) -> StaticExpression a -> a #

Corecursive (StaticExpression a) Source # 

Methods

embed :: Base (StaticExpression a) (StaticExpression a) -> StaticExpression a #

ana :: (a -> Base (StaticExpression a) a) -> a -> StaticExpression a #

apo :: (a -> Base (StaticExpression a) (Either (StaticExpression a) a)) -> a -> StaticExpression a #

postpro :: Recursive (StaticExpression a) => (forall b. Base (StaticExpression a) b -> Base (StaticExpression a) b) -> (a -> Base (StaticExpression a) a) -> a -> StaticExpression a #

gpostpro :: (Recursive (StaticExpression a), Monad m) => (forall b. m (Base (StaticExpression a) b) -> Base (StaticExpression a) (m b)) -> (forall c. Base (StaticExpression a) c -> Base (StaticExpression a) c) -> (a -> Base (StaticExpression a) (m a)) -> a -> StaticExpression a #

type Rep (StaticExpression a) Source # 
type Rep (StaticExpression a) = D1 * (MetaData "StaticExpression" "Language.ATS.Types" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "StaticVal" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Name a)))) (C1 * (MetaCons "StaticBinary" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (BinOp a))) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (StaticExpression a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (StaticExpression a))))))) ((:+:) * (C1 * (MetaCons "StaticInt" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Int))) (C1 * (MetaCons "SPrecede" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (StaticExpression a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (StaticExpression a))))))) ((:+:) * ((:+:) * (C1 * (MetaCons "StaticVoid" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a))) (C1 * (MetaCons "Sif" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "scond") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (StaticExpression a))) ((:*:) * (S1 * (MetaSel (Just Symbol "wwhenTrue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (StaticExpression a))) (S1 * (MetaSel (Just Symbol "selseExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (StaticExpression a))))))) ((:+:) * (C1 * (MetaCons "SCall" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Name a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [StaticExpression a])))) ((:+:) * (C1 * (MetaCons "SUnary" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (UnOp a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (StaticExpression a))))) (C1 * (MetaCons "SLet" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Declaration a])) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe (StaticExpression a)))))))))))
type Base (StaticExpression a) Source # 

data StackFunction a Source #

A type for stack-allocated functions. See here for more.

Constructors

StackF 

Instances

Eq a => Eq (StackFunction a) Source # 
Show a => Show (StackFunction a) Source # 
Generic (StackFunction a) Source # 

Associated Types

type Rep (StackFunction a) :: * -> * #

NFData a => NFData (StackFunction a) Source # 

Methods

rnf :: StackFunction a -> () #

type Rep (StackFunction a) Source # 
type Rep (StackFunction a) = D1 * (MetaData "StackFunction" "Language.ATS.Types" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) (C1 * (MetaCons "StackF" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "stSig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) (S1 * (MetaSel (Just Symbol "stArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Arg a]))) ((:*:) * (S1 * (MetaSel (Just Symbol "stReturnType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Type a))) (S1 * (MetaSel (Just Symbol "stExpression") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Expression a))))))

data Paired a b Source #

Constructors

Both a b 
First a 
Second b 

Instances

(Eq b, Eq a) => Eq (Paired a b) Source # 

Methods

(==) :: Paired a b -> Paired a b -> Bool #

(/=) :: Paired a b -> Paired a b -> Bool #

(Show b, Show a) => Show (Paired a b) Source # 

Methods

showsPrec :: Int -> Paired a b -> ShowS #

show :: Paired a b -> String #

showList :: [Paired a b] -> ShowS #

Generic (Paired a b) Source # 

Associated Types

type Rep (Paired a b) :: * -> * #

Methods

from :: Paired a b -> Rep (Paired a b) x #

to :: Rep (Paired a b) x -> Paired a b #

(NFData b, NFData a) => NFData (Paired a b) Source # 

Methods

rnf :: Paired a b -> () #

type Rep (Paired a b) Source # 

data Fixity a Source #

Constructors

RightFix 

Fields

LeftFix 

Fields

Pre 

Fields

Post 

Fields

Infix 

Fields

Instances

Eq a => Eq (Fixity a) Source # 

Methods

(==) :: Fixity a -> Fixity a -> Bool #

(/=) :: Fixity a -> Fixity a -> Bool #

Eq a => Ord (Fixity a) Source # 

Methods

compare :: Fixity a -> Fixity a -> Ordering #

(<) :: Fixity a -> Fixity a -> Bool #

(<=) :: Fixity a -> Fixity a -> Bool #

(>) :: Fixity a -> Fixity a -> Bool #

(>=) :: Fixity a -> Fixity a -> Bool #

max :: Fixity a -> Fixity a -> Fixity a #

min :: Fixity a -> Fixity a -> Fixity a #

Show a => Show (Fixity a) Source # 

Methods

showsPrec :: Int -> Fixity a -> ShowS #

show :: Fixity a -> String #

showList :: [Fixity a] -> ShowS #

Generic (Fixity a) Source # 

Associated Types

type Rep (Fixity a) :: * -> * #

Methods

from :: Fixity a -> Rep (Fixity a) x #

to :: Rep (Fixity a) x -> Fixity a #

NFData a => NFData (Fixity a) Source # 

Methods

rnf :: Fixity a -> () #

type Rep (Fixity a) Source # 
type Rep (Fixity a)

data SortArg a Source #

Constructors

SortArg String (Sort a) 
Anonymous (Sort a) 

Instances

Eq a => Eq (SortArg a) Source # 

Methods

(==) :: SortArg a -> SortArg a -> Bool #

(/=) :: SortArg a -> SortArg a -> Bool #

Show a => Show (SortArg a) Source # 

Methods

showsPrec :: Int -> SortArg a -> ShowS #

show :: SortArg a -> String #

showList :: [SortArg a] -> ShowS #

Generic (SortArg a) Source # 

Associated Types

type Rep (SortArg a) :: * -> * #

Methods

from :: SortArg a -> Rep (SortArg a) x #

to :: Rep (SortArg a) x -> SortArg a #

NFData a => NFData (SortArg a) Source # 

Methods

rnf :: SortArg a -> () #

type Rep (SortArg a) Source # 

data Sort a Source #

A datatype for sorts.

Constructors

NamedSort 

Fields

T0p Addendum
t@ype
Vt0p Addendum
vt@ype
Addr 
VType a Addendum

viewtype or vtype

View a Addendum
view
TupleSort a (Sort a) (Sort a) 

Instances

Eq a => Eq (Sort a) Source # 

Methods

(==) :: Sort a -> Sort a -> Bool #

(/=) :: Sort a -> Sort a -> Bool #

Show a => Show (Sort a) Source # 

Methods

showsPrec :: Int -> Sort a -> ShowS #

show :: Sort a -> String #

showList :: [Sort a] -> ShowS #

Generic (Sort a) Source # 

Associated Types

type Rep (Sort a) :: * -> * #

Methods

from :: Sort a -> Rep (Sort a) x #

to :: Rep (Sort a) x -> Sort a #

NFData a => NFData (Sort a) Source # 

Methods

rnf :: Sort a -> () #

type Rep (Sort a) Source # 
type Rep (Sort a) = D1 * (MetaData "Sort" "Language.ATS.Types" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) ((:+:) * ((:+:) * (C1 * (MetaCons "NamedSort" PrefixI True) (S1 * (MetaSel (Just Symbol "_sortName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))) ((:+:) * (C1 * (MetaCons "T0p" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum))) (C1 * (MetaCons "Vt0p" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum))))) ((:+:) * ((:+:) * (C1 * (MetaCons "Addr" PrefixI False) (U1 *)) (C1 * (MetaCons "VType" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum))))) ((:+:) * (C1 * (MetaCons "View" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum)))) (C1 * (MetaCons "TupleSort" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Sort a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Sort a)))))))))

Parser State

Lexical types

data Token Source #

Instances

Eq Token Source # 

Methods

(==) :: Token -> Token -> Bool #

(/=) :: Token -> Token -> Bool #

Show Token Source # 

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

Generic Token Source # 

Associated Types

type Rep Token :: * -> * #

Methods

from :: Token -> Rep Token x #

to :: Rep Token x -> Token #

Pretty Token Source # 

Methods

pretty :: Token -> Doc #

prettyList :: [Token] -> Doc #

NFData Token Source # 

Methods

rnf :: Token -> () #

type Rep Token # 
type Rep Token = D1 * (MetaData "Token" "Language.ATS.Lexer" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) ((:+:) * ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "Identifier" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) ((:+:) * (C1 * (MetaCons "SpecialIdentifier" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) (C1 * (MetaCons "Keyword" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Keyword)))))) ((:+:) * (C1 * (MetaCons "IntTok" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Int)))) ((:+:) * (C1 * (MetaCons "FloatTok" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Float)))) (C1 * (MetaCons "CharTok" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Char))))))) ((:+:) * ((:+:) * (C1 * (MetaCons "StringTok" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) ((:+:) * (C1 * (MetaCons "Special" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) (C1 * (MetaCons "CBlockLex" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))))) ((:+:) * ((:+:) * (C1 * (MetaCons "IdentifierSpace" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) (C1 * (MetaCons "Operator" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))))) ((:+:) * (C1 * (MetaCons "Arrow" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) (C1 * (MetaCons "FuncType" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))))))) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "CommentLex" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) ((:+:) * (C1 * (MetaCons "CommentBegin" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn))) (C1 * (MetaCons "CommentEnd" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn))))) ((:+:) * (C1 * (MetaCons "CommentContents" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) ((:+:) * (C1 * (MetaCons "MacroBlock" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) (C1 * (MetaCons "UintTok" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Word))))))) ((:+:) * ((:+:) * (C1 * (MetaCons "SignatureTok" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) ((:+:) * (C1 * (MetaCons "DoubleParenTok" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn))) (C1 * (MetaCons "DoubleBracesTok" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn))))) ((:+:) * ((:+:) * (C1 * (MetaCons "DoubleBracketTok" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn))) (C1 * (MetaCons "SpecialBracket" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)))) ((:+:) * (C1 * (MetaCons "FixityTok" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * AlexPosn)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) (C1 * (MetaCons "End" PrefixI False) (U1 *)))))))

data AlexPosn Source #

Constructors

AlexPn !Int !Int !Int 

data Keyword Source #

Instances

Eq Keyword Source # 

Methods

(==) :: Keyword -> Keyword -> Bool #

(/=) :: Keyword -> Keyword -> Bool #

Show Keyword Source # 
Generic Keyword Source # 

Associated Types

type Rep Keyword :: * -> * #

Methods

from :: Keyword -> Rep Keyword x #

to :: Rep Keyword x -> Keyword #

Pretty Keyword Source # 

Methods

pretty :: Keyword -> Doc #

prettyList :: [Keyword] -> Doc #

NFData Keyword Source # 

Methods

rnf :: Keyword -> () #

type Rep Keyword # 
type Rep Keyword = D1 * (MetaData "Keyword" "Language.ATS.Lexer" "language-ats-1.2.0.2-9rOpDEJ25a2EhkBsfydWoh" False) ((:+:) * ((:+:) * ((:+:) * ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "KwFun" PrefixI False) (U1 *)) (C1 * (MetaCons "KwFnx" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "KwAnd" PrefixI False) (U1 *)) (C1 * (MetaCons "KwDatatype" PrefixI False) (U1 *)))) ((:+:) * ((:+:) * (C1 * (MetaCons "KwDatavtype" PrefixI False) (U1 *)) (C1 * (MetaCons "KwAssume" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "KwTypedef" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "KwVtypedef" PrefixI False) (U1 *)) (C1 * (MetaCons "KwVtype" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum))))))) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "KwStaload" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool))) (C1 * (MetaCons "KwDynload" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)))) ((:+:) * (C1 * (MetaCons "KwLet" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "KwIn" PrefixI False) (U1 *)) (C1 * (MetaCons "KwLocal" PrefixI False) (U1 *))))) ((:+:) * ((:+:) * (C1 * (MetaCons "KwEnd" PrefixI False) (U1 *)) (C1 * (MetaCons "KwImplement" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "KwCase" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum))) ((:+:) * (C1 * (MetaCons "KwIf" PrefixI False) (U1 *)) (C1 * (MetaCons "KwSif" PrefixI False) (U1 *))))))) ((:+:) * ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "KwThen" PrefixI False) (U1 *)) (C1 * (MetaCons "KwElse" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "KwVal" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum))) (C1 * (MetaCons "KwVar" PrefixI False) (U1 *)))) ((:+:) * ((:+:) * (C1 * (MetaCons "KwLambda" PrefixI False) (U1 *)) (C1 * (MetaCons "KwLinearLambda" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "KwInclude" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "KwWhen" PrefixI False) (U1 *)) (C1 * (MetaCons "KwOf" PrefixI False) (U1 *)))))) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "KwAbsprop" PrefixI False) (U1 *)) (C1 * (MetaCons "KwPrval" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "KwStadef" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "KwPraxi" PrefixI False) (U1 *)) (C1 * (MetaCons "KwWhile" PrefixI False) (U1 *))))) ((:+:) * ((:+:) * (C1 * (MetaCons "KwWhere" PrefixI False) (U1 *)) (C1 * (MetaCons "KwBegin" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "KwOverload" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "KwWith" PrefixI False) (U1 *)) (C1 * (MetaCons "KwIfCase" PrefixI False) (U1 *)))))))) ((:+:) * ((:+:) * ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "KwDataview" PrefixI False) (U1 *)) (C1 * (MetaCons "KwDataprop" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "KwView" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum))) (C1 * (MetaCons "KwAbstype" PrefixI False) (U1 *)))) ((:+:) * ((:+:) * (C1 * (MetaCons "KwType" PrefixI False) (U1 *)) (C1 * (MetaCons "KwAbst0p" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum)))) ((:+:) * (C1 * (MetaCons "KwAbsvt0p" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum))) ((:+:) * (C1 * (MetaCons "KwT0p" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum))) (C1 * (MetaCons "KwVt0p" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Addendum))))))) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "KwPrfun" PrefixI False) (U1 *)) (C1 * (MetaCons "KwPrfn" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "KwCastfn" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "KwExtern" PrefixI False) (U1 *)) (C1 * (MetaCons "KwAbsvtype" PrefixI False) (U1 *))))) ((:+:) * ((:+:) * (C1 * (MetaCons "KwProofImplement" PrefixI False) (U1 *)) (C1 * (MetaCons "KwSortdef" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "KwExtVar" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "KwPropdef" PrefixI False) (U1 *)) (C1 * (MetaCons "KwRaise" PrefixI False) (U1 *))))))) ((:+:) * ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "KwTKind" PrefixI False) (U1 *)) (C1 * (MetaCons "KwMod" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "KwFixAt" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "KwLambdaAt" PrefixI False) (U1 *)) (C1 * (MetaCons "KwAddrAt" PrefixI False) (U1 *))))) ((:+:) * ((:+:) * (C1 * (MetaCons "KwAddr" PrefixI False) (U1 *)) (C1 * (MetaCons "KwSta" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "KwViewAt" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "KwViewdef" PrefixI False) (U1 *)) (C1 * (MetaCons "KwSymintr" PrefixI False) (U1 *)))))) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "KwAbsview" PrefixI False) (U1 *)) (C1 * (MetaCons "KwFn" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "KwInfix" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "KwInfixr" PrefixI False) (U1 *)) (C1 * (MetaCons "KwInfixl" PrefixI False) (U1 *))))) ((:+:) * ((:+:) * (C1 * (MetaCons "KwStacst" PrefixI False) (U1 *)) (C1 * (MetaCons "KwListLit" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))) ((:+:) * (C1 * (MetaCons "KwMacdef" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "KwDatasort" PrefixI False) (U1 *)) (C1 * (MetaCons "KwException" PrefixI False) (U1 *)))))))))

Error types

data ATSError Source #

Instances

Eq ATSError Source # 
Show ATSError Source # 
Generic ATSError Source # 

Associated Types

type Rep ATSError :: * -> * #

Methods

from :: ATSError -> Rep ATSError x #

to :: Rep ATSError x -> ATSError #

Pretty ATSError Source # 

Methods

pretty :: ATSError -> Doc #

prettyList :: [ATSError] -> Doc #

NFData ATSError Source # 

Methods

rnf :: ATSError -> () #

type Rep ATSError # 

Lenses

preF :: forall a a. Lens (Function a) (Function a) (PreFunction a) (PreFunction a) Source #

fun :: forall a. Traversal' (Declaration a) (Function a) Source #

leaves :: forall a. Traversal' (Declaration a) [Leaf a] Source #

typeCall :: forall a. Traversal' (Type a) (Name a) Source #

typeCallArgs :: forall a. Traversal' (Type a) [Type a] Source #