futhark-manifest-1.5.0.0: Definition and serialisation instances for Futhark manifests.

Safe Haskell | Safe-Inferred
Language | Haskell2010

Futhark.Manifest

Contents

- Type aliases
- Manifest

Description

C manifest data structure and serialisation to JSON.

A manifest contains machine-readable information about the API of the compiled Futhark program. Specifically which entry points are available, which types are exposed, and what their C names are. This module documentation is not intended as a full description of the Futhark C API - you will need to consult the Futhark User's Guide to understand most of the information here.

The type aliases are purely informative and do not actually enforce correct usage. They are present only because most of the information here is ultimately just text.

Synopsis

- type CFuncName = Text
- type CTypeName = Text
- type TypeName = Text
- data Manifest = Manifest {
  - manifestEntryPoints :: Map Text EntryPoint
  - manifestTypes :: Map TypeName Type
  - manifestBackend :: Text
  - manifestVersion :: Text
  }
- data Input = Input {
  - inputName :: Text
  - inputType :: TypeName
  - inputUnique :: Bool
  }
- data Output = Output {
  - outputType :: TypeName
  - outputUnique :: Bool
  }
- data EntryPoint = EntryPoint {
  - entryPointCFun :: CFuncName
  - entryPointTuningParams :: [Text]
  - entryPointOutputs :: [Output]
  - entryPointInputs :: [Input]
  }
- data Type
  - = TypeArray CTypeName TypeName Int ArrayOps
  - | TypeOpaque CTypeName OpaqueOps (Maybe OpaqueExtraOps)
- data ArrayOps = ArrayOps {
  - arrayFree :: CFuncName
  - arrayShape :: CFuncName
  - arrayValues :: CFuncName
  - arrayNew :: CFuncName
  - arrayNewRaw :: CFuncName
  - arrayValuesRaw :: CFuncName
  - arrayIndex :: CFuncName
  }
- data RecordField = RecordField {
  - recordFieldName :: Text
  - recordFieldType :: TypeName
  - recordFieldProject :: CFuncName
  }
- data RecordOps = RecordOps {
  - recordFields :: [RecordField]
  - recordNew :: CFuncName
  }
- data SumVariant = SumVariant {
  - sumVariantName :: Text
  - sumVariantPayload :: [TypeName]
  - sumVariantConstruct :: CFuncName
  - sumVariantDestruct :: CFuncName
  }
- data SumOps = SumOps {
  - sumVariants :: [SumVariant]
  - sumVariant :: CFuncName
  }
- data OpaqueArrayOps = OpaqueArrayOps {
  - opaqueArrayRank :: Int
  - opaqueArrayElemType :: TypeName
  - opaqueArrayIndex :: CFuncName
  - opaqueArrayShape :: CFuncName
  }
- data RecordArrayOps = RecordArrayOps {
  - recordArrayRank :: Int
  - recordArrayElemType :: TypeName
  - recordArrayFields :: [RecordField]
  - recordArrayZip :: CFuncName
  - recordArrayIndex :: CFuncName
  - recordArrayShape :: CFuncName
  }
- data OpaqueExtraOps
  - = OpaqueRecord RecordOps
  - | OpaqueSum SumOps
  - | OpaqueArray OpaqueArrayOps
  - | OpaqueRecordArray RecordArrayOps
- data OpaqueOps = OpaqueOps {
  - opaqueFree :: CFuncName
  - opaqueStore :: CFuncName
  - opaqueRestore :: CFuncName
  }
- manifestToJSON :: Manifest -> Text
- manifestFromJSON :: Text -> Maybe Manifest

# Type aliases

type CFuncName = Text Source #

The name of a C function.

type CTypeName = Text Source #

The name of a C type (often of the form `"struct foo*"`).

type TypeName = Text Source #

The name of a Futhark-level type. This may be an array type (without sizes, just empty brackets), a primitive type, or another string denoting an opaque type. The latter must have a corresponding entry in `manifestTypes`.

# Manifest

data Manifest Source #

A manifest for a compiled program.

Constructors

Manifest |

Fields

- manifestEntryPoints :: Map Text EntryPoint

  A mapping from Futhark entry points to how they are represented in C.

- manifestTypes :: Map TypeName Type

  A mapping from Futhark type name to how they are represented at the C level. Should not contain any of the primitive scalar types. For array types, these have empty dimensions, e.g. `[]i32`.

- manifestBackend :: Text

  The compiler backend used to compile the program, e.g. `c`.

- manifestVersion :: Text

  The version of the compiler used to compile the program.

#### Instances

Instances details

FromJSON Manifest Source # |
Instance details Defined in Futhark.Manifest Methods parseJSON :: Value -> Parser Manifest Source # parseJSONList :: Value -> Parser [Manifest] Source #
ToJSON Manifest Source # |
Instance details Defined in Futhark.Manifest Methods toJSON :: Manifest -> Value Source # toEncoding :: Manifest -> Encoding Source # toJSONList :: [Manifest] -> Value Source # toEncodingList :: [Manifest] -> Encoding Source #
Show Manifest Source # |
Instance details Defined in Futhark.Manifest Methods showsPrec :: Int -> Manifest -> ShowS Source # show :: Manifest -> String Source # showList :: [Manifest] -> ShowS Source #
Eq Manifest Source # |
Instance details Defined in Futhark.Manifest Methods (==) :: Manifest -> Manifest -> Bool Source # (/=) :: Manifest -> Manifest -> Bool Source #
Ord Manifest Source # |
Instance details Defined in Futhark.Manifest Methods compare :: Manifest -> Manifest -> Ordering Source # (<) :: Manifest -> Manifest -> Bool Source # (<=) :: Manifest -> Manifest -> Bool Source # (>) :: Manifest -> Manifest -> Bool Source # (>=) :: Manifest -> Manifest -> Bool Source # max :: Manifest -> Manifest -> Manifest Source # min :: Manifest -> Manifest -> Manifest Source #

data Input Source #

Manifest info for an entry point parameter.

Constructors

Input |

Fields

- inputName :: Text
- inputType :: TypeName
- inputUnique :: Bool

#### Instances

Instances details

FromJSON Input Source # |
Instance details Defined in Futhark.Manifest Methods parseJSON :: Value -> Parser Input Source # parseJSONList :: Value -> Parser [Input] Source #
Show Input Source # |
Instance details Defined in Futhark.Manifest Methods showsPrec :: Int -> Input -> ShowS Source # show :: Input -> String Source # showList :: [Input] -> ShowS Source #
Eq Input Source # |
Instance details Defined in Futhark.Manifest Methods (==) :: Input -> Input -> Bool Source # (/=) :: Input -> Input -> Bool Source #
Ord Input Source # |
Instance details Defined in Futhark.Manifest Methods compare :: Input -> Input -> Ordering Source # (<) :: Input -> Input -> Bool Source # (<=) :: Input -> Input -> Bool Source # (>) :: Input -> Input -> Bool Source # (>=) :: Input -> Input -> Bool Source # max :: Input -> Input -> Input Source # min :: Input -> Input -> Input Source #

data Output Source #

Manifest info for an entry point return value.

Constructors

Output |

Fields

- outputType :: TypeName
- outputUnique :: Bool

#### Instances

Instances details

FromJSON Output Source # |
Instance details Defined in Futhark.Manifest Methods parseJSON :: Value -> Parser Output Source # parseJSONList :: Value -> Parser [Output] Source #
Show Output Source # |
Instance details Defined in Futhark.Manifest Methods showsPrec :: Int -> Output -> ShowS Source # show :: Output -> String Source # showList :: [Output] -> ShowS Source #
Eq Output Source # |
Instance details Defined in Futhark.Manifest Methods (==) :: Output -> Output -> Bool Source # (/=) :: Output -> Output -> Bool Source #
Ord Output Source # |
Instance details Defined in Futhark.Manifest Methods compare :: Output -> Output -> Ordering Source # (<) :: Output -> Output -> Bool Source # (<=) :: Output -> Output -> Bool Source # (>) :: Output -> Output -> Bool Source # (>=) :: Output -> Output -> Bool Source # max :: Output -> Output -> Output Source # min :: Output -> Output -> Output Source #

data EntryPoint Source #

Manifest info for an entry point.

Constructors

EntryPoint |

Fields

- entryPointCFun :: CFuncName
- entryPointTuningParams :: [Text]
- entryPointOutputs :: [Output]
- entryPointInputs :: [Input]

#### Instances

Instances details

FromJSON EntryPoint Source # |
Instance details Defined in Futhark.Manifest Methods parseJSON :: Value -> Parser EntryPoint Source # parseJSONList :: Value -> Parser [EntryPoint] Source #
Show EntryPoint Source # |
Instance details Defined in Futhark.Manifest Methods showsPrec :: Int -> EntryPoint -> ShowS Source # show :: EntryPoint -> String Source # showList :: [EntryPoint] -> ShowS Source #
Eq EntryPoint Source # |
Instance details Defined in Futhark.Manifest Methods (==) :: EntryPoint -> EntryPoint -> Bool Source # (/=) :: EntryPoint -> EntryPoint -> Bool Source #
Ord EntryPoint Source # |

Instance details

Defined in Futhark.Manifest

Methods

compare :: EntryPoint -> EntryPoint -> Ordering Source #

(<) :: EntryPoint -> EntryPoint -> Bool Source #

(<=) :: EntryPoint -> EntryPoint -> Bool Source #

(>) :: EntryPoint -> EntryPoint -> Bool Source #

(>=) :: EntryPoint -> EntryPoint -> Bool Source #

max :: EntryPoint -> EntryPoint -> EntryPoint Source #

min :: EntryPoint -> EntryPoint -> EntryPoint Source #

data Type Source #

Manifest info for a non-scalar type. Scalar types are not part of the manifest for a program. Although this representation allows a type to be both a a record and a sum type, this will never actually happen.

Constructors

TypeArray CTypeName TypeName Int ArrayOps | ctype, Futhark elemtype, rank.
TypeOpaque CTypeName OpaqueOps (Maybe OpaqueExtraOps) |

#### Instances

Instances details

FromJSON Type Source # |
Instance details Defined in Futhark.Manifest Methods parseJSON :: Value -> Parser Type Source # parseJSONList :: Value -> Parser [Type] Source #
Show Type Source # |
Instance details Defined in Futhark.Manifest Methods showsPrec :: Int -> Type -> ShowS Source # show :: Type -> String Source # showList :: [Type] -> ShowS Source #
Eq Type Source # |
Instance details Defined in Futhark.Manifest Methods (==) :: Type -> Type -> Bool Source # (/=) :: Type -> Type -> Bool Source #
Ord Type Source # |
Instance details Defined in Futhark.Manifest Methods compare :: Type -> Type -> Ordering Source # (<) :: Type -> Type -> Bool Source # (<=) :: Type -> Type -> Bool Source # (>) :: Type -> Type -> Bool Source # (>=) :: Type -> Type -> Bool Source # max :: Type -> Type -> Type Source # min :: Type -> Type -> Type Source #

data ArrayOps Source #

The names of the C functions implementing the operations on some array type.

Constructors

ArrayOps |

Fields

- arrayFree :: CFuncName
- arrayShape :: CFuncName
- arrayValues :: CFuncName
- arrayNew :: CFuncName
- arrayNewRaw :: CFuncName
- arrayValuesRaw :: CFuncName
- arrayIndex :: CFuncName

#### Instances

Instances details

FromJSON ArrayOps Source # |
Instance details Defined in Futhark.Manifest Methods parseJSON :: Value -> Parser ArrayOps Source # parseJSONList :: Value -> Parser [ArrayOps] Source #
ToJSON ArrayOps Source # |
Instance details Defined in Futhark.Manifest Methods toJSON :: ArrayOps -> Value Source # toEncoding :: ArrayOps -> Encoding Source # toJSONList :: [ArrayOps] -> Value Source # toEncodingList :: [ArrayOps] -> Encoding Source #
Show ArrayOps Source # |
Instance details Defined in Futhark.Manifest Methods showsPrec :: Int -> ArrayOps -> ShowS Source # show :: ArrayOps -> String Source # showList :: [ArrayOps] -> ShowS Source #
Eq ArrayOps Source # |
Instance details Defined in Futhark.Manifest Methods (==) :: ArrayOps -> ArrayOps -> Bool Source # (/=) :: ArrayOps -> ArrayOps -> Bool Source #
Ord ArrayOps Source # |
Instance details Defined in Futhark.Manifest Methods compare :: ArrayOps -> ArrayOps -> Ordering Source # (<) :: ArrayOps -> ArrayOps -> Bool Source # (<=) :: ArrayOps -> ArrayOps -> Bool Source # (>) :: ArrayOps -> ArrayOps -> Bool Source # (>=) :: ArrayOps -> ArrayOps -> Bool Source # max :: ArrayOps -> ArrayOps -> ArrayOps Source # min :: ArrayOps -> ArrayOps -> ArrayOps Source #

data RecordField Source #

Information about a record field. Also used for fields of record arrays; see `RecordArrayOps`.

Constructors

RecordField |

Fields

- recordFieldName :: Text

  The original name of the field. This may be a name that is not a valid C identifier.

- recordFieldType :: TypeName

  The type of the field.

- recordFieldProject :: CFuncName

  The name of the projection function.

#### Instances

Instances details

FromJSON RecordField Source # |
Instance details Defined in Futhark.Manifest Methods parseJSON :: Value -> Parser RecordField Source # parseJSONList :: Value -> Parser [RecordField] Source #
ToJSON RecordField Source # |
Instance details Defined in Futhark.Manifest Methods toJSON :: RecordField -> Value Source # toEncoding :: RecordField -> Encoding Source # toJSONList :: [RecordField] -> Value Source # toEncodingList :: [RecordField] -> Encoding Source #
Show RecordField Source # |
Instance details Defined in Futhark.Manifest Methods showsPrec :: Int -> RecordField -> ShowS Source # show :: RecordField -> String Source # showList :: [RecordField] -> ShowS Source #
Eq RecordField Source # |
Instance details Defined in Futhark.Manifest Methods (==) :: RecordField -> RecordField -> Bool Source # (/=) :: RecordField -> RecordField -> Bool Source #
Ord RecordField Source # |

Instance details

Defined in Futhark.Manifest

Methods

compare :: RecordField -> RecordField -> Ordering Source #

(<) :: RecordField -> RecordField -> Bool Source #

(<=) :: RecordField -> RecordField -> Bool Source #

(>) :: RecordField -> RecordField -> Bool Source #

(>=) :: RecordField -> RecordField -> Bool Source #

max :: RecordField -> RecordField -> RecordField Source #

min :: RecordField -> RecordField -> RecordField Source #

data RecordOps Source #

Some opaque types are records, from which we can extract fields, and also construct them from values for their fields. Beyond that, they support the usual opaque operations. These record facilities can be ignored if you wish, and the types treated as ordinary opaque types.

Constructors

RecordOps |

Fields

- recordFields :: [RecordField]

  Note that the ordering of fields here is semantically significant - it is also the order that the "new" function expects.

- recordNew :: CFuncName

#### Instances

Instances details

FromJSON RecordOps Source # |
Instance details Defined in Futhark.Manifest Methods parseJSON :: Value -> Parser RecordOps Source # parseJSONList :: Value -> Parser [RecordOps] Source #
ToJSON RecordOps Source # |
Instance details Defined in Futhark.Manifest Methods toJSON :: RecordOps -> Value Source # toEncoding :: RecordOps -> Encoding Source # toJSONList :: [RecordOps] -> Value Source # toEncodingList :: [RecordOps] -> Encoding Source #
Show RecordOps Source # |
Instance details Defined in Futhark.Manifest Methods showsPrec :: Int -> RecordOps -> ShowS Source # show :: RecordOps -> String Source # showList :: [RecordOps] -> ShowS Source #
Eq RecordOps Source # |
Instance details Defined in Futhark.Manifest Methods (==) :: RecordOps -> RecordOps -> Bool Source # (/=) :: RecordOps -> RecordOps -> Bool Source #
Ord RecordOps Source # |

Instance details

Defined in Futhark.Manifest

Methods

compare :: RecordOps -> RecordOps -> Ordering Source #

(<) :: RecordOps -> RecordOps -> Bool Source #

(<=) :: RecordOps -> RecordOps -> Bool Source #

(>) :: RecordOps -> RecordOps -> Bool Source #

(>=) :: RecordOps -> RecordOps -> Bool Source #

max :: RecordOps -> RecordOps -> RecordOps Source #

min :: RecordOps -> RecordOps -> RecordOps Source #

data SumVariant Source #

Information about a variant of a sum type.

Constructors

SumVariant |

Fields

- sumVariantName :: Text

  The name of the constructor. This may be a name that is not a valid C identifier.

- sumVariantPayload :: [TypeName]

  The payload of this variant; also corresponding to the arguments of the constructor and destructor functions.

- sumVariantConstruct :: CFuncName
- sumVariantDestruct :: CFuncName

  Note that despite the name, "destruction" does not entail freeing the sum type value.

#### Instances

Instances details

FromJSON SumVariant Source # |
Instance details Defined in Futhark.Manifest Methods parseJSON :: Value -> Parser SumVariant Source # parseJSONList :: Value -> Parser [SumVariant] Source #
ToJSON SumVariant Source # |
Instance details Defined in Futhark.Manifest Methods toJSON :: SumVariant -> Value Source # toEncoding :: SumVariant -> Encoding Source # toJSONList :: [SumVariant] -> Value Source # toEncodingList :: [SumVariant] -> Encoding Source #
Show SumVariant Source # |
Instance details Defined in Futhark.Manifest Methods showsPrec :: Int -> SumVariant -> ShowS Source # show :: SumVariant -> String Source # showList :: [SumVariant] -> ShowS Source #
Eq SumVariant Source # |
Instance details Defined in Futhark.Manifest Methods (==) :: SumVariant -> SumVariant -> Bool Source # (/=) :: SumVariant -> SumVariant -> Bool Source #
Ord SumVariant Source # |

Instance details

Defined in Futhark.Manifest

Methods

compare :: SumVariant -> SumVariant -> Ordering Source #

(<) :: SumVariant -> SumVariant -> Bool Source #

(<=) :: SumVariant -> SumVariant -> Bool Source #

(>) :: SumVariant -> SumVariant -> Bool Source #

(>=) :: SumVariant -> SumVariant -> Bool Source #

max :: SumVariant -> SumVariant -> SumVariant Source #

min :: SumVariant -> SumVariant -> SumVariant Source #

data SumOps Source #

Some opaque types are sum types, from which we can (try to) extract the payload of a constructor, as well as construct them from payloads. As with records, we can ignore these facilities and simply treat them as completely opaque.

Constructors

SumOps |

Fields

- sumVariants :: [SumVariant]
- sumVariant :: CFuncName

  This function returns an integer that identifies which variant a value is an instance of. This integer is a valid index in `sumVariants`.

#### Instances

Instances details

FromJSON SumOps Source # |
Instance details Defined in Futhark.Manifest Methods parseJSON :: Value -> Parser SumOps Source # parseJSONList :: Value -> Parser [SumOps] Source #
ToJSON SumOps Source # |
Instance details Defined in Futhark.Manifest Methods toJSON :: SumOps -> Value Source # toEncoding :: SumOps -> Encoding Source # toJSONList :: [SumOps] -> Value Source # toEncodingList :: [SumOps] -> Encoding Source #
Show SumOps Source # |
Instance details Defined in Futhark.Manifest Methods showsPrec :: Int -> SumOps -> ShowS Source # show :: SumOps -> String Source # showList :: [SumOps] -> ShowS Source #
Eq SumOps Source # |
Instance details Defined in Futhark.Manifest Methods (==) :: SumOps -> SumOps -> Bool Source # (/=) :: SumOps -> SumOps -> Bool Source #
Ord SumOps Source # |
Instance details Defined in Futhark.Manifest Methods compare :: SumOps -> SumOps -> Ordering Source # (<) :: SumOps -> SumOps -> Bool Source # (<=) :: SumOps -> SumOps -> Bool Source # (>) :: SumOps -> SumOps -> Bool Source # (>=) :: SumOps -> SumOps -> Bool Source # max :: SumOps -> SumOps -> SumOps Source # min :: SumOps -> SumOps -> SumOps Source #

data OpaqueArrayOps Source #

Some opaque types are arrays of opaque types. These still support some array-like operations, but their types are somewhat different. Note that arrays of primitives are `TypeArray`s, and arrays of records support `RecordArrayOps`.

Constructors

OpaqueArrayOps |

Fields

- opaqueArrayRank :: Int
- opaqueArrayElemType :: TypeName
- opaqueArrayIndex :: CFuncName
- opaqueArrayShape :: CFuncName

#### Instances

Instances details

FromJSON OpaqueArrayOps Source # |
Instance details Defined in Futhark.Manifest Methods parseJSON :: Value -> Parser OpaqueArrayOps Source # parseJSONList :: Value -> Parser [OpaqueArrayOps] Source #
ToJSON OpaqueArrayOps Source # |
Instance details Defined in Futhark.Manifest Methods toJSON :: OpaqueArrayOps -> Value Source # toEncoding :: OpaqueArrayOps -> Encoding Source # toJSONList :: [OpaqueArrayOps] -> Value Source # toEncodingList :: [OpaqueArrayOps] -> Encoding Source #
Show OpaqueArrayOps Source # |
Instance details Defined in Futhark.Manifest Methods showsPrec :: Int -> OpaqueArrayOps -> ShowS Source # show :: OpaqueArrayOps -> String Source # showList :: [OpaqueArrayOps] -> ShowS Source #
Eq OpaqueArrayOps Source # |
Instance details Defined in Futhark.Manifest Methods (==) :: OpaqueArrayOps -> OpaqueArrayOps -> Bool Source # (/=) :: OpaqueArrayOps -> OpaqueArrayOps -> Bool Source #
Ord OpaqueArrayOps Source # |

Instance details

Defined in Futhark.Manifest

Methods

compare :: OpaqueArrayOps -> OpaqueArrayOps -> Ordering Source #

(<) :: OpaqueArrayOps -> OpaqueArrayOps -> Bool Source #

(<=) :: OpaqueArrayOps -> OpaqueArrayOps -> Bool Source #

(>) :: OpaqueArrayOps -> OpaqueArrayOps -> Bool Source #

(>=) :: OpaqueArrayOps -> OpaqueArrayOps -> Bool Source #

max :: OpaqueArrayOps -> OpaqueArrayOps -> OpaqueArrayOps Source #

min :: OpaqueArrayOps -> OpaqueArrayOps -> OpaqueArrayOps Source #

data RecordArrayOps Source #

Some opaque types are arrays of records. The `RecordField`s here will contain array types, and the projection functions will retrieve arrays.

Constructors

RecordArrayOps |

Fields

- recordArrayRank :: Int
- recordArrayElemType :: TypeName
- recordArrayFields :: [RecordField]
- recordArrayZip :: CFuncName
- recordArrayIndex :: CFuncName
- recordArrayShape :: CFuncName

#### Instances

Instances details

FromJSON RecordArrayOps Source # |
Instance details Defined in Futhark.Manifest Methods parseJSON :: Value -> Parser RecordArrayOps Source # parseJSONList :: Value -> Parser [RecordArrayOps] Source #
ToJSON RecordArrayOps Source # |
Instance details Defined in Futhark.Manifest Methods toJSON :: RecordArrayOps -> Value Source # toEncoding :: RecordArrayOps -> Encoding Source # toJSONList :: [RecordArrayOps] -> Value Source # toEncodingList :: [RecordArrayOps] -> Encoding Source #
Show RecordArrayOps Source # |
Instance details Defined in Futhark.Manifest Methods showsPrec :: Int -> RecordArrayOps -> ShowS Source # show :: RecordArrayOps -> String Source # showList :: [RecordArrayOps] -> ShowS Source #
Eq RecordArrayOps Source # |
Instance details Defined in Futhark.Manifest Methods (==) :: RecordArrayOps -> RecordArrayOps -> Bool Source # (/=) :: RecordArrayOps -> RecordArrayOps -> Bool Source #
Ord RecordArrayOps Source # |

Instance details

Defined in Futhark.Manifest

Methods

compare :: RecordArrayOps -> RecordArrayOps -> Ordering Source #

(<) :: RecordArrayOps -> RecordArrayOps -> Bool Source #

(<=) :: RecordArrayOps -> RecordArrayOps -> Bool Source #

(>) :: RecordArrayOps -> RecordArrayOps -> Bool Source #

(>=) :: RecordArrayOps -> RecordArrayOps -> Bool Source #

max :: RecordArrayOps -> RecordArrayOps -> RecordArrayOps Source #

min :: RecordArrayOps -> RecordArrayOps -> RecordArrayOps Source #

data OpaqueExtraOps Source #

Some opaque types have a known structure, which allows additional operations.

Constructors

OpaqueRecord RecordOps |
OpaqueSum SumOps |
OpaqueArray OpaqueArrayOps |
OpaqueRecordArray RecordArrayOps |

#### Instances

Instances details

Show OpaqueExtraOps Source # |
Instance details Defined in Futhark.Manifest Methods showsPrec :: Int -> OpaqueExtraOps -> ShowS Source # show :: OpaqueExtraOps -> String Source # showList :: [OpaqueExtraOps] -> ShowS Source #
Eq OpaqueExtraOps Source # |
Instance details Defined in Futhark.Manifest Methods (==) :: OpaqueExtraOps -> OpaqueExtraOps -> Bool Source # (/=) :: OpaqueExtraOps -> OpaqueExtraOps -> Bool Source #
Ord OpaqueExtraOps Source # |

Instance details

Defined in Futhark.Manifest

Methods

compare :: OpaqueExtraOps -> OpaqueExtraOps -> Ordering Source #

(<) :: OpaqueExtraOps -> OpaqueExtraOps -> Bool Source #

(<=) :: OpaqueExtraOps -> OpaqueExtraOps -> Bool Source #

(>) :: OpaqueExtraOps -> OpaqueExtraOps -> Bool Source #

(>=) :: OpaqueExtraOps -> OpaqueExtraOps -> Bool Source #

max :: OpaqueExtraOps -> OpaqueExtraOps -> OpaqueExtraOps Source #

min :: OpaqueExtraOps -> OpaqueExtraOps -> OpaqueExtraOps Source #

data OpaqueOps Source #

The names of the C functions implementing the operations on some opaque type.

Constructors

OpaqueOps |

Fields

- opaqueFree :: CFuncName
- opaqueStore :: CFuncName
- opaqueRestore :: CFuncName

#### Instances

Instances details

FromJSON OpaqueOps Source # |
Instance details Defined in Futhark.Manifest Methods parseJSON :: Value -> Parser OpaqueOps Source # parseJSONList :: Value -> Parser [OpaqueOps] Source #
ToJSON OpaqueOps Source # |
Instance details Defined in Futhark.Manifest Methods toJSON :: OpaqueOps -> Value Source # toEncoding :: OpaqueOps -> Encoding Source # toJSONList :: [OpaqueOps] -> Value Source # toEncodingList :: [OpaqueOps] -> Encoding Source #
Show OpaqueOps Source # |
Instance details Defined in Futhark.Manifest Methods showsPrec :: Int -> OpaqueOps -> ShowS Source # show :: OpaqueOps -> String Source # showList :: [OpaqueOps] -> ShowS Source #
Eq OpaqueOps Source # |
Instance details Defined in Futhark.Manifest Methods (==) :: OpaqueOps -> OpaqueOps -> Bool Source # (/=) :: OpaqueOps -> OpaqueOps -> Bool Source #
Ord OpaqueOps Source # |

Instance details

Defined in Futhark.Manifest

Methods

compare :: OpaqueOps -> OpaqueOps -> Ordering Source #

(<) :: OpaqueOps -> OpaqueOps -> Bool Source #

(<=) :: OpaqueOps -> OpaqueOps -> Bool Source #

(>) :: OpaqueOps -> OpaqueOps -> Bool Source #

(>=) :: OpaqueOps -> OpaqueOps -> Bool Source #

max :: OpaqueOps -> OpaqueOps -> OpaqueOps Source #

min :: OpaqueOps -> OpaqueOps -> OpaqueOps Source #

manifestToJSON :: Manifest -> Text Source #

Serialise a manifest to JSON.

manifestFromJSON :: Text -> Maybe Manifest Source #

Read a manifest from JSON. Returns `Nothing` if the text does not describe a `Manifest`.