HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduletoml-parser-2.0.0.0Haskell2010

Toml.Schema.Generic.ToValue

Use genericToTable to derive an instance of Toml.ToValue.ToTable using the field names of a record.

Use genericToArray to derive an instance of Toml.ToValue.ToValue using the positions of data in a constructor.

  • 2 classes
  • 2 values

Records to Tables

2 declarations
classclass GToTable (f :: Type -> Type) where
#

Supports conversion of product types with field selector names to TOML values.

Methods

Instances7GToTable, …
  • GToTable U1Defined in toml-parser-2.0.0.0 · Toml.Schema.Generic.ToValue

    Emits empty table

  • GToTable V1Defined in toml-parser-2.0.0.0 · Toml.Schema.Generic.ToValue
  • GToTable f => GToTable (C1 c f)Defined in toml-parser-2.0.0.0 · Toml.Schema.Generic.ToValue

    Ignores value constructor names

  • GToTable f => GToTable (D1 c f)Defined in toml-parser-2.0.0.0 · Toml.Schema.Generic.ToValue

    Ignores type constructor names

  • (Selector s, ToValue a) => GToTable (S1 s (K1 i (Maybe a)))Defined in toml-parser-2.0.0.0 · Toml.Schema.Generic.ToValue

    Omits the key from the table on nothing, includes it on just

  • (Selector s, ToValue a) => GToTable (S1 s (K1 i a))Defined in toml-parser-2.0.0.0 · Toml.Schema.Generic.ToValue

    Uses record selector name as table key

  • (GToTable f, GToTable g) => GToTable (f :*: g)Defined in toml-parser-2.0.0.0 · Toml.Schema.Generic.ToValue

Product types to Arrays

2 declarations
classclass GToArray (f :: Type -> Type) where
#

Convert product types to arrays positionally.

Methods

Instances3GToArray
  • ToValue a => GToArray (K1 i a)Defined in toml-parser-2.0.0.0 · Toml.Schema.Generic.ToValue

    Convert fields using ToValue instances

  • (GToArray f, GToArray g) => GToArray (f :*: g)Defined in toml-parser-2.0.0.0 · Toml.Schema.Generic.ToValue

    Convert left and then right

  • GToArray f => GToArray (M1 i c f)Defined in toml-parser-2.0.0.0 · Toml.Schema.Generic.ToValue

    Ignore metadata