Safe Haskell | None |
---|
All Fay types and instances.
- data JsStmt
- data JsExp
- = JsName JsName
- | JsRawName String
- | JsFun [JsParam] [JsStmt] (Maybe JsExp)
- | JsLit JsLit
- | JsApp JsExp [JsExp]
- | JsTernaryIf JsExp JsExp JsExp
- | JsNull
- | JsSequence [JsExp]
- | JsParen JsExp
- | JsGetProp JsExp JsName
- | JsList [JsExp]
- | JsNew JsName [JsExp]
- | JsThrowExp JsExp
- | JsInstanceOf JsExp JsName
- | JsIndex Int JsExp
- | JsEq JsExp JsExp
- | JsInfix String JsExp JsExp
- data JsLit
- type JsParam = JsName
- type JsName = QName
- data CompileError
- = ParseError SrcLoc String
- | UnsupportedDeclaration Decl
- | UnsupportedMatchSyntax Match
- | UnsupportedExpression Exp
- | UnsupportedLiteral Literal
- | UnsupportedLetBinding Decl
- | UnsupportedOperator QOp
- | UnsupportedPattern Pat
- | UnsupportedRhs Rhs
- | UnsupportedGuardedAlts GuardedAlts
- | EmptyDoBlock
- | UnsupportedModuleSyntax Module
- | LetUnsupported
- | InvalidDoBlock
- | RecursiveDoUnsupported
- | FfiNeedsTypeSig Decl
- type Compile = ErrorT CompileError IO
- class (Parseable from, Printable to) => CompilesTo from to | from -> to where
- class Printable a where
- data Fay a
Documentation
Statement type.
Expression type.
Literal value type.
data CompileError Source
Error type.
type Compile = ErrorT CompileError IOSource
Convenience/doc type.
class (Parseable from, Printable to) => CompilesTo from to | from -> to whereSource
Just a convenience class to generalize the parsing/printing of various types of syntax.
Print some value.
Printable ModuleName | Print module name. |
Printable SpecialCon | Print special constructors (tuples, list, etc.) |
Printable QName | Print (and properly encode to JS) a qualified name. |
Printable Name | Print (and properly encode) a name. |
Printable JsLit | Print literals. These need some special encoding for JS-format literals. Could use the Text.JSON library. |
Printable JsExp | Print an expression. |
Printable JsStmt | Print a single statement. |
Printable [JsStmt] | Print a list of statements. |