ganeti
Safe HaskellNone

Ganeti.THH.Compat

Description

Shim library for supporting various Template Haskell versions

Synopsis

Documentation

derivesFromNames :: [Name] -> [DerivClause] Source #

Convert Names to DerivClauses

template-haskell 2.12 (GHC 8.2) has changed the DataD class of constructors to expect [DerivClause] instead of [Names]. Handle this in a backwards-compatible way.

gntDataD :: Cxt -> Name -> [TyVarBndr] -> [Con] -> [Name] -> Dec Source #

DataD "constructor" function

Handle TH 2.11 and 2.12 changes in a transparent manner using the pre-2.11 API.

gntInstanceD :: Cxt -> Type -> [Dec] -> Dec Source #

InstanceD "constructor" function

Handle TH 2.11 and 2.12 changes in a transparent manner using the pre-2.11 API.

extractDataDConstructors :: Info -> Maybe [Con] Source #

Extract constructors from a DataD instance

Handle TH 2.11 changes by abstracting pattern matching against DataD.

myNotStrict :: Bang Source #

Strict has been replaced by Bang, so redefine NotStrict in terms of the latter.

nonUnaryTupE :: [Exp] -> Exp Source #

TupE changed from '[Exp] -> Exp' to '[Maybe Exp] -> Exp'. Provide the old signature for compatibility.