| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
JL.Types
Synopsis
- data ParseException
- = TokenizerError !ParseError
- | ParserError !ParseError
- data Type
- data Expression
- = VariableExpression Variable
- | LambdaExpression Variable Expression
- | ApplicationExpression Expression Expression
- | InfixExpression Expression Variable Expression
- | IfExpression Expression Expression Expression
- | SubscriptExpression Subscripted [Subscript]
- | RecordExpression (HashMap Text Expression)
- | ArrayExpression (Vector Expression)
- | ConstantExpression Constant
- data Subscripted
- data Subscript
- data Core
- = VariableCore Variable
- | LambdaCore Variable Core
- | ApplicationCore Core Core
- | IfCore Core Core Core
- | EvalCore (Core -> Core)
- | RecordCore (HashMap Text Core)
- | ArrayCore (Vector Core)
- | ConstantCore Constant
- data Compare
- = ConstantCompare Constant
- | VectorCompare (Vector Compare)
- | RecordCompare [(Text, Compare)]
- coreToCompare :: Core -> Compare
- data Constant
- = StringConstant Text
- | NumberConstant Scientific
- | BoolConstant Bool
- | NullConstant
- newtype TypeVariable = TypeVariable Int
- newtype Variable = Variable Text
- data Token
- = If
- | Then
- | Else
- | Case
- | Of
- | Backslash
- | RightArrow
- | Dollar
- | OpenParen
- | CloseParen
- | OpenBracket
- | CloseBracket
- | VariableToken !Text
- | StringToken !Text
- | Operator !Text
- | Period
- | Comma
- | Integer !Integer
- | Decimal !Double
- | OpenBrace
- | CloseBrace
- | Colon
- | NonIndentedNewline
- | Bar
- | TrueToken
- | FalseToken
- | NullToken
- data Location = Location {
- locationStartLine :: !Int
- locationStartColumn :: !Int
- locationEndLine :: !Int
- locationEndColumn :: !Int
- data Definition = Definition {
- definitionName :: Variable
- definitionDoc :: Text
- definitionType :: Type
- definitionCore :: Core
Documentation
data ParseException Source #
Constructors
| TokenizerError !ParseError | |
| ParserError !ParseError |
Instances
| Exception ParseException Source # | |
Defined in JL.Types Methods toException :: ParseException -> SomeException fromException :: SomeException -> Maybe ParseException displayException :: ParseException -> String backtraceDesired :: ParseException -> Bool | |
| Show ParseException Source # | |
Defined in JL.Types Methods showsPrec :: Int -> ParseException -> ShowS show :: ParseException -> String showList :: [ParseException] -> ShowS | |
A type.
Constructors
| VariableType !TypeVariable | |
| FunctionType !Type !Type | |
| JSONType |
data Expression Source #
A parsed expression.
Constructors
Instances
| Show Expression Source # | |
Defined in JL.Types Methods showsPrec :: Int -> Expression -> ShowS show :: Expression -> String showList :: [Expression] -> ShowS | |
| Eq Expression Source # | |
Defined in JL.Types | |
data Subscripted Source #
Constructors
| WildcardSubscripted | |
| ExpressionSubscripted Expression |
Instances
| Show Subscripted Source # | |
Defined in JL.Types Methods showsPrec :: Int -> Subscripted -> ShowS show :: Subscripted -> String showList :: [Subscripted] -> ShowS | |
| Eq Subscripted Source # | |
Defined in JL.Types | |
Constructors
| PropertySubscript Text | |
| ExpressionSubscript Expression |
Desugared core AST.
Constructors
| VariableCore Variable | |
| LambdaCore Variable Core | |
| ApplicationCore Core Core | |
| IfCore Core Core Core | |
| EvalCore (Core -> Core) | |
| RecordCore (HashMap Text Core) | |
| ArrayCore (Vector Core) | |
| ConstantCore Constant |
Constructors
| ConstantCompare Constant | |
| VectorCompare (Vector Compare) | |
| RecordCompare [(Text, Compare)] |
coreToCompare :: Core -> Compare Source #
A self-evaluating constant.
Constructors
| StringConstant Text | |
| NumberConstant Scientific | |
| BoolConstant Bool | |
| NullConstant |
newtype TypeVariable Source #
A type variable, generated by the type system.
Constructors
| TypeVariable Int |
Instances
| Show TypeVariable Source # | |
Defined in JL.Types Methods showsPrec :: Int -> TypeVariable -> ShowS show :: TypeVariable -> String showList :: [TypeVariable] -> ShowS | |
| Eq TypeVariable Source # | |
Defined in JL.Types | |
| Ord TypeVariable Source # | |
Defined in JL.Types Methods compare :: TypeVariable -> TypeVariable -> Ordering (<) :: TypeVariable -> TypeVariable -> Bool (<=) :: TypeVariable -> TypeVariable -> Bool (>) :: TypeVariable -> TypeVariable -> Bool (>=) :: TypeVariable -> TypeVariable -> Bool max :: TypeVariable -> TypeVariable -> TypeVariable min :: TypeVariable -> TypeVariable -> TypeVariable | |
A value variable, inputted by the programmer.
Constructors
| Variable Text |
Constructors
| If | |
| Then | |
| Else | |
| Case | |
| Of | |
| Backslash | |
| RightArrow | |
| Dollar | |
| OpenParen | |
| CloseParen | |
| OpenBracket | |
| CloseBracket | |
| VariableToken !Text | |
| StringToken !Text | |
| Operator !Text | |
| Period | |
| Comma | |
| Integer !Integer | |
| Decimal !Double | |
| OpenBrace | |
| CloseBrace | |
| Colon | |
| NonIndentedNewline | |
| Bar | |
| TrueToken | |
| FalseToken | |
| NullToken |
Constructors
| Location | |
Fields
| |
data Definition Source #
Constructors
| Definition | |
Fields
| |