Safe Haskell | None |
---|---|
Language | Haskell2010 |
L
Synopsis
- alexMonadScan :: Alex Tok
- alexInitUserState :: AlexUserState
- withAlexSt :: ByteString -> AlexUserState -> Alex a -> Either String (AlexUserState, a)
- freshName :: Text -> Alex (Nm AlexPosn)
- newIdent :: AlexPosn -> Text -> AlexUserState -> (AlexUserState, Nm AlexPosn)
- data AlexPosn = AlexPn !Int !Int !Int
- newtype Alex a = Alex {}
- data Tok
- data Sym
- = Plus
- | Minus
- | Fold
- | Foldl
- | Percent
- | Times
- | Semicolon
- | Bind
- | Pow
- | LSqBracket
- | RSqBracket
- | LBrace
- | RBrace
- | IxTimes
- | LParen
- | RParen
- | Lam
- | Dot
- | Caret
- | Quot
- | Zip
- | Comma
- | Underscore
- | QuestionMark
- | Colon
- | CondSplit
- | Cor
- | ArrL
- | ArrR
- | SymLog
- | LBind
- | PolyBind
- | LRank
- | Compose
- | Arrow
- | Sig
- | MaxS
- | MinS
- | DIS
- | Succ
- | Conv
- | Access { }
- | TSig
- | Cons
- | Snoc
- | Do
- | Tensor
- | Transp
- | PlusPlus
- | Rotate
- | Last
- | LastM
- | Head
- | HeadM
- | Tail
- | TailM
- | Init
- | InitM
- | Geq
- | Gt
- | Eq
- | Neq
- | Leq
- | Lt
- | FoldA
- | FoldS
- | Tilde
- | Cyc
- | A1
- | Mod
- | AtDot
- | Eye
- | Para
- | Weier
- | Ice
- | B
- | Sharp
- | And
- | Or
- | Xor
- | Not
- | Sr
- | Sl
- | IDiv
- | Inv
- | Therefore
- data Builtin
- = BuiltinFRange
- | BuiltinIota
- | BuiltinFloor
- | BuiltinE
- | BuiltinI
- | BuiltinF
- | BuiltinTrue
- | BuiltinFalse
- | BuiltinSqrt
- | BuiltinPi
- | BuiltinGen
- | BuiltinRep
- | BuiltinScan
- | BuiltinCons
- | BuiltinNil
- | BuiltinMMul
- | BuiltinArr
- | BuiltinInt
- | BuiltinFloat
- | BuiltinT
- | BuiltinR
- | BuiltinSin
- | BuiltinCos
- | BuiltinScanS
- | BuiltinTan
- | BuiltinVMul
- | BuiltinCyc
- | BuiltinOdd
- | BuiltinEven
- | BuiltinAbs
- | BuiltinD
- | BuiltinVec
- | BuiltinM
- | BuiltinBool
- data Var
- type AlexUserState = (Int, Map Text Int, IntMap (Nm AlexPosn))
Documentation
alexMonadScan :: Alex Tok Source #
withAlexSt :: ByteString -> AlexUserState -> Alex a -> Either String (AlexUserState, a) Source #
newIdent :: AlexPosn -> Text -> AlexUserState -> (AlexUserState, Nm AlexPosn) Source #
Instances
Instances
NFData Tok Source # | |||||
Generic Tok Source # | |||||
Defined in L Associated Types
| |||||
Pretty Tok Source # | |||||
type Rep Tok Source # | |||||
Defined in L type Rep Tok = D1 ('MetaData "Tok" "L" "apple-0.3.0.0-inplace" 'False) (((C1 ('MetaCons "EOF" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AlexPosn)) :+: C1 ('MetaCons "TokSym" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AlexPosn) :*: S1 ('MetaSel ('Just "sym") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Sym))) :+: (C1 ('MetaCons "TokName" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AlexPosn) :*: S1 ('MetaSel ('Just "_name") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Nm AlexPosn))) :+: C1 ('MetaCons "TokIx" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AlexPosn) :*: S1 ('MetaSel ('Just "six") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)))) :+: ((C1 ('MetaCons "TokB" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AlexPosn) :*: S1 ('MetaSel ('Just "_builtin") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Builtin)) :+: C1 ('MetaCons "TokResVar" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AlexPosn) :*: S1 ('MetaSel ('Just "_var") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Var))) :+: (C1 ('MetaCons "TokInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AlexPosn) :*: S1 ('MetaSel ('Just "int") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)) :+: C1 ('MetaCons "TokFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AlexPosn) :*: S1 ('MetaSel ('Just "float") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double))))) |
Constructors
Plus | |
Minus | |
Fold | |
Foldl | |
Percent | |
Times | |
Semicolon | |
Bind | |
Pow | |
LSqBracket | |
RSqBracket | |
LBrace | |
RBrace | |
IxTimes | |
LParen | |
RParen | |
Lam | |
Dot | |
Caret | |
Quot | |
Zip | |
Comma | |
Underscore | |
QuestionMark | |
Colon | |
CondSplit | |
Cor | |
ArrL | |
ArrR | |
SymLog | |
LBind | |
PolyBind | |
LRank | |
Compose | |
Arrow | |
Sig | |
MaxS | |
MinS | |
DIS | |
Succ | |
Conv | |
Access | |
TSig | |
Cons | |
Snoc | |
Do | |
Tensor | |
Transp | |
PlusPlus | |
Rotate | |
Last | |
LastM | |
Head | |
HeadM | |
Tail | |
TailM | |
Init | |
InitM | |
Geq | |
Gt | |
Eq | |
Neq | |
Leq | |
Lt | |
FoldA | |
FoldS | |
Tilde | |
Cyc | |
A1 | |
Mod | |
AtDot | |
Eye | |
Para | |
Weier | |
Ice | |
B | |
Sharp | |
And | |
Or | |
Xor | |
Not | |
Sr | |
Sl | |
IDiv | |
Inv | |
Therefore |
Instances
NFData Sym Source # | |||||
Generic Sym Source # | |||||
Defined in L Associated Types
| |||||
Pretty Sym Source # | |||||
type Rep Sym Source # | |||||
Defined in L type Rep Sym = D1 ('MetaData "Sym" "L" "apple-0.3.0.0-inplace" 'False) ((((((C1 ('MetaCons "Plus" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Minus" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Fold" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Foldl" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Percent" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Times" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Semicolon" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Bind" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Pow" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LSqBracket" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "RSqBracket" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LBrace" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RBrace" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IxTimes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LParen" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "RParen" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Lam" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Dot" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Caret" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Quot" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Zip" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "Comma" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Underscore" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "QuestionMark" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Colon" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CondSplit" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Cor" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ArrL" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ArrR" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SymLog" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LBind" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PolyBind" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "LRank" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Compose" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Arrow" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Sig" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MaxS" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "MinS" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DIS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Succ" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Conv" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Access" 'PrefixI 'True) (S1 ('MetaSel ('Just "iat") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "TSig" 'PrefixI 'False) (U1 :: Type -> Type))))))) :+: (((((C1 ('MetaCons "Cons" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Snoc" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Do" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Tensor" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Transp" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "PlusPlus" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Rotate" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Last" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LastM" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Head" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "HeadM" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Tail" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TailM" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Init" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InitM" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Geq" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Gt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Eq" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Neq" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Leq" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Lt" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "FoldA" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FoldS" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Tilde" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Cyc" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "A1" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Mod" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AtDot" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Eye" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Para" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Weier" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Ice" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "B" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Sharp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "And" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Or" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Xor" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Not" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Sr" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Sl" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "IDiv" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Inv" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Therefore" 'PrefixI 'False) (U1 :: Type -> Type)))))))) |
Constructors
BuiltinFRange | |
BuiltinIota | |
BuiltinFloor | |
BuiltinE | |
BuiltinI | |
BuiltinF | |
BuiltinTrue | |
BuiltinFalse | |
BuiltinSqrt | |
BuiltinPi | |
BuiltinGen | |
BuiltinRep | |
BuiltinScan | |
BuiltinCons | |
BuiltinNil | |
BuiltinMMul | |
BuiltinArr | |
BuiltinInt | |
BuiltinFloat | |
BuiltinT | |
BuiltinR | |
BuiltinSin | |
BuiltinCos | |
BuiltinScanS | |
BuiltinTan | |
BuiltinVMul | |
BuiltinCyc | |
BuiltinOdd | |
BuiltinEven | |
BuiltinAbs | |
BuiltinD | |
BuiltinVec | |
BuiltinM | |
BuiltinBool |
Instances
NFData Builtin Source # | |||||
Generic Builtin Source # | |||||
Defined in L Associated Types
| |||||
Pretty Builtin Source # | |||||
type Rep Builtin Source # | |||||
Defined in L type Rep Builtin = D1 ('MetaData "Builtin" "L" "apple-0.3.0.0-inplace" 'False) (((((C1 ('MetaCons "BuiltinFRange" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinIota" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BuiltinFloor" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinE" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BuiltinI" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinF" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BuiltinTrue" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinFalse" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "BuiltinSqrt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinPi" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BuiltinGen" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinRep" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BuiltinScan" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinCons" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BuiltinNil" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BuiltinMMul" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinArr" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "BuiltinInt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinFloat" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BuiltinT" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinR" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BuiltinSin" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinCos" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BuiltinScanS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinTan" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "BuiltinVMul" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinCyc" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BuiltinOdd" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinEven" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BuiltinAbs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinD" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BuiltinVec" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BuiltinM" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinBool" 'PrefixI 'False) (U1 :: Type -> Type))))))) |