futhark-manifest-1.0.0.1: Definition and serialisation instances for Futhark manifests.
Safe HaskellNone
LanguageHaskell2010

Futhark.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.

Synopsis

Documentation

data Manifest Source #

A manifest for a compiled program.

Constructors

Manifest 

Fields

Instances

Instances details
Eq Manifest Source # 
Instance details

Defined in Futhark.Manifest

Ord Manifest Source # 
Instance details

Defined in Futhark.Manifest

Show Manifest Source # 
Instance details

Defined in Futhark.Manifest

ToJSON Manifest Source # 
Instance details

Defined in Futhark.Manifest

FromJSON Manifest Source # 
Instance details

Defined in Futhark.Manifest

data Input Source #

Manifest info for an entry point parameter.

Constructors

Input 

Instances

Instances details
Eq Input Source # 
Instance details

Defined in Futhark.Manifest

Methods

(==) :: Input -> Input -> Bool #

(/=) :: Input -> Input -> Bool #

Ord Input Source # 
Instance details

Defined in Futhark.Manifest

Methods

compare :: Input -> Input -> Ordering #

(<) :: Input -> Input -> Bool #

(<=) :: Input -> Input -> Bool #

(>) :: Input -> Input -> Bool #

(>=) :: Input -> Input -> Bool #

max :: Input -> Input -> Input #

min :: Input -> Input -> Input #

Show Input Source # 
Instance details

Defined in Futhark.Manifest

Methods

showsPrec :: Int -> Input -> ShowS #

show :: Input -> String #

showList :: [Input] -> ShowS #

FromJSON Input Source # 
Instance details

Defined in Futhark.Manifest

data Output Source #

Manifest info for an entry point return value.

Constructors

Output 

Instances

Instances details
Eq Output Source # 
Instance details

Defined in Futhark.Manifest

Methods

(==) :: Output -> Output -> Bool #

(/=) :: Output -> Output -> Bool #

Ord Output Source # 
Instance details

Defined in Futhark.Manifest

Show Output Source # 
Instance details

Defined in Futhark.Manifest

FromJSON Output Source # 
Instance details

Defined in Futhark.Manifest

data EntryPoint Source #

Manifest info for an entry point.

data Type Source #

Manifest info for a non-scalar type. Scalar types are not part of the manifest for a program.

Constructors

TypeArray Text Text Int ArrayOps

ctype, Futhark elemtype, rank.

TypeOpaque Text OpaqueOps 

Instances

Instances details
Eq Type Source # 
Instance details

Defined in Futhark.Manifest

Methods

(==) :: Type -> Type -> Bool #

(/=) :: Type -> Type -> Bool #

Ord Type Source # 
Instance details

Defined in Futhark.Manifest

Methods

compare :: Type -> Type -> Ordering #

(<) :: Type -> Type -> Bool #

(<=) :: Type -> Type -> Bool #

(>) :: Type -> Type -> Bool #

(>=) :: Type -> Type -> Bool #

max :: Type -> Type -> Type #

min :: Type -> Type -> Type #

Show Type Source # 
Instance details

Defined in Futhark.Manifest

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #

FromJSON Type Source # 
Instance details

Defined in Futhark.Manifest

data ArrayOps Source #

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

Constructors

ArrayOps 

Instances

Instances details
Eq ArrayOps Source # 
Instance details

Defined in Futhark.Manifest

Ord ArrayOps Source # 
Instance details

Defined in Futhark.Manifest

Show ArrayOps Source # 
Instance details

Defined in Futhark.Manifest

ToJSON ArrayOps Source # 
Instance details

Defined in Futhark.Manifest

FromJSON ArrayOps Source # 
Instance details

Defined in Futhark.Manifest

data OpaqueOps Source #

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

Constructors

OpaqueOps 

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.