Copyright | (C) 2015 Richard Eisenberg |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Richard Eisenberg (rae@cs.brynmawr.edu) |
Stability | experimental |
Safe Haskell | Safe |
Language | Haskell2010 |
Defines a lexical token
- data ArithOp ty where
- data UArithOp where
- eqArithOp :: ArithOp ty1 -> ArithOp ty2 -> Bool
- uPlus :: UArithOp
- uMinus :: UArithOp
- uTimes :: UArithOp
- uDivide :: UArithOp
- uMod :: UArithOp
- uLess :: UArithOp
- uLessE :: UArithOp
- uGreater :: UArithOp
- uGreaterE :: UArithOp
- uEquals :: UArithOp
- data Token
- data LToken = L SourcePos Token
- unLoc :: LToken -> Token
- unArithOp :: Token -> Maybe UArithOp
- unInt :: Token -> Maybe Int
- unBool :: Token -> Maybe Bool
- unName :: Token -> Maybe String
Arithmetic operators
data ArithOp ty where Source #
An ArithOp ty
is an operator on numbers that produces a result
of type ty
eqArithOp :: ArithOp ty1 -> ArithOp ty2 -> Bool Source #
Compare two ArithOp
s (potentially of different types) for equality
Unchecked synonyms for arithmetic operators
Tokens
A lexed token
A lexed token with location information attached