Copyright | (c) The University of Glasgow 2001 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Jeffrey Young <jeffrey.young@iohk.io> Luite Stegeman <luite.stegeman@iohk.io> Sylvain Henry <sylvain.henry@iohk.io> Josh Meredith <josh.meredith@iohk.io> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Domain and Purpose
GHC.JS.Syntax defines the Syntax for the JS backend in GHC. It comports with the ECMA-262 although not every production rule of the standard is represented. Code in this module is a fork of JMacro (BSD 3 Clause) by Gershom Bazerman, heavily modified to accomodate GHC's constraints.
Strategy
Nothing fancy in this module, this is a classic deeply embeded AST for JS. We define numerous ADTs and pattern synonyms to make pattern matching and constructing ASTs easier.
Consumers
The entire JS backend consumes this module, e.g., the modules in GHC.StgToJS.*. Please see
Make
for a module which provides helper functions that use the deeply embedded DSL defined in this module to provide some of the benefits of a shallow embedding.
Synopsis
- data JStat
- = DeclStat !Ident !(Maybe JExpr)
- | ReturnStat JExpr
- | IfStat JExpr JStat JStat
- | WhileStat Bool JExpr JStat
- | ForStat JStat JExpr JStat JStat
- | ForInStat Bool Ident JExpr JStat
- | SwitchStat JExpr [(JExpr, JStat)] JStat
- | TryStat JStat Ident JStat JStat
- | BlockStat [JStat]
- | ApplStat JExpr [JExpr]
- | UOpStat UOp JExpr
- | AssignStat JExpr AOp JExpr
- | LabelStat JLabel JStat
- | BreakStat (Maybe JLabel)
- | ContinueStat (Maybe JLabel)
- | FuncStat !Ident [Ident] JStat
- data JExpr
- data JVal
- = JVar Ident
- | JList [JExpr]
- | JDouble SaneDouble
- | JInt Integer
- | JStr FastString
- | JRegEx FastString
- | JHash (UniqMap FastString JExpr)
- | JFunc [Ident] JStat
- data Op
- = EqOp
- | StrictEqOp
- | NeqOp
- | StrictNeqOp
- | GtOp
- | GeOp
- | LtOp
- | LeOp
- | AddOp
- | SubOp
- | MulOp
- | DivOp
- | ModOp
- | LeftShiftOp
- | RightShiftOp
- | ZRightShiftOp
- | BAndOp
- | BOrOp
- | BXorOp
- | LAndOp
- | LOrOp
- | InstanceofOp
- | InOp
- data UOp
- data AOp
- newtype Ident = TxtI {
- itxt :: FastString
- type JLabel = LexicalFastString
- pattern JNew :: JExpr -> JExpr
- pattern JNot :: JExpr -> JExpr
- pattern JNegate :: JExpr -> JExpr
- pattern JAdd :: JExpr -> JExpr -> JExpr
- pattern JSub :: JExpr -> JExpr -> JExpr
- pattern JMul :: JExpr -> JExpr -> JExpr
- pattern JDiv :: JExpr -> JExpr -> JExpr
- pattern JMod :: JExpr -> JExpr -> JExpr
- pattern JBOr :: JExpr -> JExpr -> JExpr
- pattern JBAnd :: JExpr -> JExpr -> JExpr
- pattern JBXor :: JExpr -> JExpr -> JExpr
- pattern JBNot :: JExpr -> JExpr
- pattern JLOr :: JExpr -> JExpr -> JExpr
- pattern JLAnd :: JExpr -> JExpr -> JExpr
- pattern SatInt :: Integer -> JExpr
- pattern JString :: FastString -> JExpr
- pattern JPreInc :: JExpr -> JExpr
- pattern JPostInc :: JExpr -> JExpr
- pattern JPreDec :: JExpr -> JExpr
- pattern JPostDec :: JExpr -> JExpr
- newtype SaneDouble = SaneDouble {}
- jassignAll :: [JExpr] -> [JExpr] -> JStat
- jassignAllEqual :: [JExpr] -> [JExpr] -> JStat
- jvar :: FastString -> JExpr
Deeply embedded JS datatypes
JavaScript statements, see the ECMA262 Reference for details
DeclStat !Ident !(Maybe JExpr) | Variable declarations: var foo [= e] |
ReturnStat JExpr | Return |
IfStat JExpr JStat JStat | If |
WhileStat Bool JExpr JStat | While, bool is "do" when True |
ForStat JStat JExpr JStat JStat | For |
ForInStat Bool Ident JExpr JStat | For-in, bool is "each' when True |
SwitchStat JExpr [(JExpr, JStat)] JStat | Switch |
TryStat JStat Ident JStat JStat | Try |
BlockStat [JStat] | Blocks |
ApplStat JExpr [JExpr] | Application |
UOpStat UOp JExpr | Unary operators |
AssignStat JExpr AOp JExpr | |
LabelStat JLabel JStat | Statement Labels, makes me nostalgic for qbasic |
BreakStat (Maybe JLabel) | Break |
ContinueStat (Maybe JLabel) | Continue |
FuncStat !Ident [Ident] JStat | an explicit function definition |
Instances
JavaScript Expressions
ValExpr JVal | All values are trivially expressions |
SelExpr JExpr Ident | Selection: Obj.foo, see |
IdxExpr JExpr JExpr | Indexing: Obj[foo], see |
InfixExpr Op JExpr JExpr | Infix Expressions, see |
UOpExpr UOp JExpr | Unary Expressions |
IfExpr JExpr JExpr JExpr | If-expression |
ApplExpr JExpr [JExpr] | Application |
Instances
Generic JExpr Source # | |||||
Defined in GHC.JS.Syntax
| |||||
JsToDoc JExpr Source # | |||||
Binary JExpr Source # | |||||
Outputable JExpr Source # | |||||
Eq JExpr Source # | |||||
JsToDoc [JExpr] Source # | |||||
type Rep JExpr Source # | |||||
Defined in GHC.JS.Syntax type Rep JExpr = D1 ('MetaData "JExpr" "GHC.JS.Syntax" "ghc-9.8.1-7829" 'False) ((C1 ('MetaCons "ValExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JVal)) :+: (C1 ('MetaCons "SelExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :+: C1 ('MetaCons "IdxExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr)))) :+: ((C1 ('MetaCons "InfixExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Op) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr))) :+: C1 ('MetaCons "UOpExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UOp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr))) :+: (C1 ('MetaCons "IfExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr))) :+: C1 ('MetaCons "ApplExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [JExpr]))))) |
JavaScript values
JVar Ident | A variable reference |
JList [JExpr] | A JavaScript list, or what JS calls an Array |
JDouble SaneDouble | A Double |
JInt Integer | A BigInt |
JStr FastString | A String |
JRegEx FastString | A Regex |
JHash (UniqMap FastString JExpr) | A JS HashMap: |
JFunc [Ident] JStat | A function |
Instances
Generic JVal Source # | |||||
Defined in GHC.JS.Syntax
| |||||
JsToDoc JVal Source # | |||||
Binary JVal Source # | |||||
Outputable JVal Source # | |||||
Eq JVal Source # | |||||
type Rep JVal Source # | |||||
Defined in GHC.JS.Syntax type Rep JVal = D1 ('MetaData "JVal" "GHC.JS.Syntax" "ghc-9.8.1-7829" 'False) (((C1 ('MetaCons "JVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :+: C1 ('MetaCons "JList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [JExpr]))) :+: (C1 ('MetaCons "JDouble" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SaneDouble)) :+: C1 ('MetaCons "JInt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))) :+: ((C1 ('MetaCons "JStr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FastString)) :+: C1 ('MetaCons "JRegEx" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FastString))) :+: (C1 ('MetaCons "JHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (UniqMap FastString JExpr))) :+: C1 ('MetaCons "JFunc" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Ident]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStat))))) |
JS Binary Operators. We do not deeply embed the comma operator and the assignment operators
EqOp | Equality: |
StrictEqOp | Strict Equality: |
NeqOp | InEquality: |
StrictNeqOp | Strict InEquality |
GtOp | Greater Than: |
GeOp | Greater Than or Equal: |
LtOp | Less Than: < |
LeOp | Less Than or Equal: <= |
AddOp | Addition: + |
SubOp | Subtraction: - |
MulOp | Multiplication * |
DivOp | Division: / |
ModOp | Remainder: % |
LeftShiftOp | Left Shift: << |
RightShiftOp | Right Shift: >> |
ZRightShiftOp | Unsigned RightShift: >>> |
BAndOp | Bitwise And: & |
BOrOp | Bitwise Or: | |
BXorOp | Bitwise XOr: ^ |
LAndOp | Logical And: && |
LOrOp | Logical Or: || |
InstanceofOp | instanceof |
InOp | in |
Instances
Data Op Source # | |||||
Defined in GHC.JS.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Op -> c Op Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Op Source # toConstr :: Op -> Constr Source # dataTypeOf :: Op -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Op) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Op) Source # gmapT :: (forall b. Data b => b -> b) -> Op -> Op Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Op -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Op -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Op -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Op -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Op -> m Op Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Op -> m Op Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Op -> m Op Source # | |||||
Enum Op Source # | |||||
Generic Op Source # | |||||
Defined in GHC.JS.Syntax
| |||||
Show Op Source # | |||||
NFData Op Source # | |||||
Defined in GHC.JS.Syntax | |||||
Binary Op Source # | |||||
Eq Op Source # | |||||
Ord Op Source # | |||||
type Rep Op Source # | |||||
Defined in GHC.JS.Syntax type Rep Op = D1 ('MetaData "Op" "GHC.JS.Syntax" "ghc-9.8.1-7829" 'False) ((((C1 ('MetaCons "EqOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "StrictEqOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NeqOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "StrictNeqOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GtOp" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "GeOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LtOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LeOp" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "AddOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SubOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MulOp" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "DivOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ModOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LeftShiftOp" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "RightShiftOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ZRightShiftOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BAndOp" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "BOrOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BXorOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LAndOp" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "LOrOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "InstanceofOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InOp" 'PrefixI 'False) (U1 :: Type -> Type)))))) |
JS Unary Operators
NotOp | Logical Not: |
BNotOp | Bitwise Not: |
NegOp | Negation: |
PlusOp | Unary Plus: |
NewOp | new x |
TypeofOp | typeof x |
DeleteOp | delete x |
YieldOp | yield x |
VoidOp | void x |
PreIncOp | Prefix Increment: |
PostIncOp | Postfix Increment: |
PreDecOp | Prefix Decrement: |
PostDecOp | Postfix Decrement: |
Instances
Data UOp Source # | |||||
Defined in GHC.JS.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UOp -> c UOp Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UOp Source # toConstr :: UOp -> Constr Source # dataTypeOf :: UOp -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UOp) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UOp) Source # gmapT :: (forall b. Data b => b -> b) -> UOp -> UOp Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UOp -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UOp -> r Source # gmapQ :: (forall d. Data d => d -> u) -> UOp -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> UOp -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UOp -> m UOp Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UOp -> m UOp Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UOp -> m UOp Source # | |||||
Enum UOp Source # | |||||
Defined in GHC.JS.Syntax | |||||
Generic UOp Source # | |||||
Defined in GHC.JS.Syntax
| |||||
Show UOp Source # | |||||
NFData UOp Source # | |||||
Defined in GHC.JS.Syntax | |||||
Binary UOp Source # | |||||
Eq UOp Source # | |||||
Ord UOp Source # | |||||
type Rep UOp Source # | |||||
Defined in GHC.JS.Syntax type Rep UOp = D1 ('MetaData "UOp" "GHC.JS.Syntax" "ghc-9.8.1-7829" 'False) (((C1 ('MetaCons "NotOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BNotOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NegOp" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "PlusOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NewOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeofOp" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "DeleteOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "YieldOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "VoidOp" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PreIncOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PostIncOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PreDecOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PostDecOp" 'PrefixI 'False) (U1 :: Type -> Type))))) |
JS Unary Operators
AssignOp | Vanilla Assignment: = |
AddAssignOp | Addition Assignment: += |
SubAssignOp | Subtraction Assignment: -= |
Instances
Data AOp Source # | |||||
Defined in GHC.JS.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AOp -> c AOp Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AOp Source # toConstr :: AOp -> Constr Source # dataTypeOf :: AOp -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AOp) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AOp) Source # gmapT :: (forall b. Data b => b -> b) -> AOp -> AOp Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AOp -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AOp -> r Source # gmapQ :: (forall d. Data d => d -> u) -> AOp -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> AOp -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AOp -> m AOp Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AOp -> m AOp Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AOp -> m AOp Source # | |||||
Enum AOp Source # | |||||
Defined in GHC.JS.Syntax | |||||
Generic AOp Source # | |||||
Defined in GHC.JS.Syntax
| |||||
Show AOp Source # | |||||
NFData AOp Source # | |||||
Defined in GHC.JS.Syntax | |||||
Binary AOp Source # | |||||
Eq AOp Source # | |||||
Ord AOp Source # | |||||
type Rep AOp Source # | |||||
Defined in GHC.JS.Syntax |
A newtype wrapper around FastString
for JS identifiers.
TxtI | |
|
type JLabel = LexicalFastString Source #
A Label used for JStat
, specifically BreakStat
, ContinueStat
and of
course LabelStat
pattern synonyms over JS operators
pattern JString :: FastString -> JExpr Source #
pattern synonym to create string values
Utility
newtype SaneDouble Source #
A newtype wrapper around Double
to ensure we never generate a Double
that becomes a NaN
, see instances for details on sanity.
Instances
Num SaneDouble Source # | |
Defined in GHC.Types.SaneDouble (+) :: SaneDouble -> SaneDouble -> SaneDouble Source # (-) :: SaneDouble -> SaneDouble -> SaneDouble Source # (*) :: SaneDouble -> SaneDouble -> SaneDouble Source # negate :: SaneDouble -> SaneDouble Source # abs :: SaneDouble -> SaneDouble Source # signum :: SaneDouble -> SaneDouble Source # fromInteger :: Integer -> SaneDouble Source # | |
Fractional SaneDouble Source # | |
Defined in GHC.Types.SaneDouble (/) :: SaneDouble -> SaneDouble -> SaneDouble Source # recip :: SaneDouble -> SaneDouble Source # fromRational :: Rational -> SaneDouble Source # | |
Show SaneDouble Source # | |
Defined in GHC.Types.SaneDouble | |
Binary SaneDouble Source # | |
Defined in GHC.Types.SaneDouble put_ :: BinHandle -> SaneDouble -> IO () Source # put :: BinHandle -> SaneDouble -> IO (Bin SaneDouble) Source # | |
Eq SaneDouble Source # | |
Defined in GHC.Types.SaneDouble (==) :: SaneDouble -> SaneDouble -> Bool # (/=) :: SaneDouble -> SaneDouble -> Bool # | |
Ord SaneDouble Source # | |
Defined in GHC.Types.SaneDouble compare :: SaneDouble -> SaneDouble -> Ordering # (<) :: SaneDouble -> SaneDouble -> Bool # (<=) :: SaneDouble -> SaneDouble -> Bool # (>) :: SaneDouble -> SaneDouble -> Bool # (>=) :: SaneDouble -> SaneDouble -> Bool # max :: SaneDouble -> SaneDouble -> SaneDouble # min :: SaneDouble -> SaneDouble -> SaneDouble # |
jvar :: FastString -> JExpr Source #