HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduleghc-lib-parser-9.14.1.20251220GHC2021

GHC.JS.JStg.Syntax

  • Domain and Purpose

    GHC.JS.JStg.Syntax defines the eDSL that the JS backend's runtime system is written in. Nothing fancy, its just a straightforward deeply embedded DSL.

    In general, one should not use these constructors explicitly in the JS backend. Instead, prefer using the combinators in GHC.JS.Make, if those are suitable then prefer using the patterns exported from this module

Contents
  1. Deeply embedded JS datatypes
  2. pattern synonyms over JS operators
  3. Utility
Synopsis

Deeply embedded JS datatypes

datadata JStgStat

JavaScript statements, see the ECMA262 Reference for details

Constructors

Instances7Eq, Generic, Semigroup, Monoid, ToStat, Rep, …
datadata JStgExpr

JavaScript Expressions

Constructors

Instances10Eq, Fractional, Num, Generic, Outputable, JVarMagic, …
datadata JVal

JavaScript values

Constructors

Instances5Eq, Generic, JVarMagic, ToJExpr, Rep
datadata Op

JS Binary Operators. We do not deeply embed the comma operator and the assignment operators

Constructors

Instances8Enum, Eq, Data, Ord, Show, Generic, …
datadata AOp

JS Unary Operators

Constructors

Instances8Enum, Eq, Data, Ord, Show, Generic, …
  • Enum AOpDefined in ghc-lib-parser-9.14.1.20251220 · GHC.JS.JStg.Syntax
  • Eq AOpDefined in ghc-lib-parser-9.14.1.20251220 · GHC.JS.JStg.Syntax
  • Data AOpDefined in ghc-lib-parser-9.14.1.20251220 · GHC.JS.JStg.Syntax
  • Ord AOpDefined in ghc-lib-parser-9.14.1.20251220 · GHC.JS.JStg.Syntax
  • Show AOpDefined in ghc-lib-parser-9.14.1.20251220 · GHC.JS.JStg.Syntax
  • Generic AOpDefined in ghc-lib-parser-9.14.1.20251220 · GHC.JS.JStg.Syntax
  • NFData AOpDefined in ghc-lib-parser-9.14.1.20251220 · GHC.JS.JStg.Syntax
  • type Rep AOp = D1 ('MetaData "AOp" "GHC.JS.JStg.Syntax" "ghc-lib-parser-9.14.1.20251220-JOQbPftkqxyIjwT1cpdf9x" 'False) (C1 ('MetaCons "AssignOp" 'PrefixI 'False) U1 :+: (C1 ('MetaCons "AddAssignOp" 'PrefixI 'False) U1 :+: C1 ('MetaCons "SubAssignOp" 'PrefixI 'False) U1))Defined in ghc-lib-parser-9.14.1.20251220 · GHC.JS.JStg.Syntax
datadata UOp

JS Unary Operators

Constructors

Instances8Enum, Eq, Data, Ord, Show, Generic, …

pattern synonyms over JS operators

Utility

newtypenewtype SaneDouble

A newtype wrapper around Double to ensure we never generate a Double that becomes a NaN, see instances for details on sanity.

Instances6Eq, Fractional, Num, Ord, Show, Binary
  • Eq SaneDoubleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.SaneDouble
  • Fractional SaneDoubleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.SaneDouble
  • Num SaneDoubleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.SaneDouble
  • Ord SaneDoubleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.SaneDouble
  • Show SaneDoubleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.SaneDouble
  • Binary SaneDoubleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.SaneDouble