kempe-0.1.1.0: Kempe compiler
Safe HaskellNone
LanguageHaskell2010

Kempe.Lexer

Documentation

data AlexPosn Source #

Constructors

AlexPn !Int !Int !Int 

Instances

Instances details
Eq AlexPosn Source # 
Instance details

Defined in Kempe.Lexer

Ord AlexPosn Source # 
Instance details

Defined in Kempe.Lexer

Show AlexPosn Source # 
Instance details

Defined in Kempe.Lexer

Generic AlexPosn Source # 
Instance details

Defined in Kempe.Lexer

Associated Types

type Rep AlexPosn :: Type -> Type #

Methods

from :: AlexPosn -> Rep AlexPosn x #

to :: Rep AlexPosn x -> AlexPosn #

NFData AlexPosn Source # 
Instance details

Defined in Kempe.Lexer

Methods

rnf :: AlexPosn -> () #

Pretty AlexPosn 
Instance details

Defined in Kempe.Lexer

Methods

pretty :: AlexPosn -> Doc ann

prettyList :: [AlexPosn] -> Doc ann

type Rep AlexPosn Source # 
Instance details

Defined in Kempe.Lexer

newtype Alex a Source #

Constructors

Alex 

Fields

Instances

Instances details
Monad Alex Source # 
Instance details

Defined in Kempe.Lexer

Methods

(>>=) :: Alex a -> (a -> Alex b) -> Alex b #

(>>) :: Alex a -> Alex b -> Alex b #

return :: a -> Alex a #

Functor Alex Source # 
Instance details

Defined in Kempe.Lexer

Methods

fmap :: (a -> b) -> Alex a -> Alex b #

(<$) :: a -> Alex b -> Alex a #

Applicative Alex Source # 
Instance details

Defined in Kempe.Lexer

Methods

pure :: a -> Alex a #

(<*>) :: Alex (a -> b) -> Alex a -> Alex b #

liftA2 :: (a -> b -> c) -> Alex a -> Alex b -> Alex c #

(*>) :: Alex a -> Alex b -> Alex b #

(<*) :: Alex a -> Alex b -> Alex a #

data Token a Source #

Constructors

EOF 

Fields

TokSym 

Fields

TokName 

Fields

TokTyName 

Fields

TokKeyword 

Fields

TokInt 

Fields

TokInt8 

Fields

TokWord 

Fields

TokForeign 

Fields

TokModuleStr 

Fields

TokBuiltin 

Fields

Instances

Instances details
Generic (Token a) Source # 
Instance details

Defined in Kempe.Lexer

Associated Types

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

Methods

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

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

NFData a => NFData (Token a) Source # 
Instance details

Defined in Kempe.Lexer

Methods

rnf :: Token a -> () #

Pretty (Token a) Source # 
Instance details

Defined in Kempe.Lexer

Methods

pretty :: Token a -> Doc ann

prettyList :: [Token a] -> Doc ann

type Rep (Token a) Source # 
Instance details

Defined in Kempe.Lexer

type Rep (Token a) = D1 ('MetaData "Token" "Kempe.Lexer" "kempe-0.1.1.0-inplace-kempe-modules" 'False) (((C1 ('MetaCons "EOF" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "TokSym" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "_sym") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Sym))) :+: (C1 ('MetaCons "TokName" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Name a))) :+: (C1 ('MetaCons "TokTyName" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "_tyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TyName a))) :+: C1 ('MetaCons "TokKeyword" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "_kw") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Keyword))))) :+: ((C1 ('MetaCons "TokInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "int") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)) :+: (C1 ('MetaCons "TokInt8" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "int8") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int8)) :+: C1 ('MetaCons "TokWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "word") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural)))) :+: (C1 ('MetaCons "TokForeign" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "ident") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :+: (C1 ('MetaCons "TokModuleStr" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "moduleFp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :+: C1 ('MetaCons "TokBuiltin" 'PrefixI 'True) (S1 ('MetaSel ('Just "loc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "builtin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Builtin))))))

data Keyword Source #

Instances

Instances details
Generic Keyword Source # 
Instance details

Defined in Kempe.Lexer

Associated Types

type Rep Keyword :: Type -> Type #

Methods

from :: Keyword -> Rep Keyword x #

to :: Rep Keyword x -> Keyword #

NFData Keyword Source # 
Instance details

Defined in Kempe.Lexer

Methods

rnf :: Keyword -> () #

Pretty Keyword Source # 
Instance details

Defined in Kempe.Lexer

Methods

pretty :: Keyword -> Doc ann

prettyList :: [Keyword] -> Doc ann

type Rep Keyword Source # 
Instance details

Defined in Kempe.Lexer

type Rep Keyword = D1 ('MetaData "Keyword" "Kempe.Lexer" "kempe-0.1.1.0-inplace-kempe-modules" 'False) (((C1 ('MetaCons "KwType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KwImport" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "KwCase" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KwCfun" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "KwIf" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KwForeign" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "KwCabi" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KwKabi" 'PrefixI 'False) (U1 :: Type -> Type))))

data Sym Source #

Instances

Instances details
Generic Sym Source # 
Instance details

Defined in Kempe.Lexer

Associated Types

type Rep Sym :: Type -> Type #

Methods

from :: Sym -> Rep Sym x #

to :: Rep Sym x -> Sym #

NFData Sym Source # 
Instance details

Defined in Kempe.Lexer

Methods

rnf :: Sym -> () #

Pretty Sym Source # 
Instance details

Defined in Kempe.Lexer

Methods

pretty :: Sym -> Doc ann

prettyList :: [Sym] -> Doc ann

type Rep Sym Source # 
Instance details

Defined in Kempe.Lexer

type Rep Sym = D1 ('MetaData "Sym" "Kempe.Lexer" "kempe-0.1.1.0-inplace-kempe-modules" 'False) (((((C1 ('MetaCons "Arrow" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Plus" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PlusU" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Minus" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Percent" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Div" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Times" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TimesU" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DefEq" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "Eq" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ShiftL" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ShiftR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ShiftLU" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ShiftRU" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Colon" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LBrace" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RBrace" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Semicolon" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "LSqBracket" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RSqBracket" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "VBar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CaseArr" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "LParen" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RParen" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Comma" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Underscore" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Leq" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "Lt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MinusU" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DivU" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ModU" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Neq" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Geq" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Gt" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "AndTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OrTok" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NegTok" 'PrefixI 'False) (U1 :: Type -> Type)))))))

data Builtin Source #

Instances

Instances details
Generic Builtin Source # 
Instance details

Defined in Kempe.Lexer

Associated Types

type Rep Builtin :: Type -> Type #

Methods

from :: Builtin -> Rep Builtin x #

to :: Rep Builtin x -> Builtin #

NFData Builtin Source # 
Instance details

Defined in Kempe.Lexer

Methods

rnf :: Builtin -> () #

Pretty Builtin Source # 
Instance details

Defined in Kempe.Lexer

Methods

pretty :: Builtin -> Doc ann

prettyList :: [Builtin] -> Doc ann

type Rep Builtin Source # 
Instance details

Defined in Kempe.Lexer

type Rep Builtin = D1 ('MetaData "Builtin" "Kempe.Lexer" "kempe-0.1.1.0-inplace-kempe-modules" 'False) (((C1 ('MetaCons "BuiltinBool" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BuiltinBoolLit" 'PrefixI 'True) (S1 ('MetaSel ('Just "bool") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :+: C1 ('MetaCons "BuiltinInt" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "BuiltinInt8" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BuiltinWord" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinDip" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "BuiltinDrop" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BuiltinSwap" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinDup" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BuiltinIntXor" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinWordXor" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BuiltinBoolXor" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BuiltinPopcount" 'PrefixI 'False) (U1 :: Type -> Type)))))