recursion-schemes-ext-0.2.0.1: Amateur addenda to recursion-schemes

Safe HaskellNone
LanguageHaskell2010

Data.Functor.Foldable.Exotic.TH

Contents

Description

Module containing Template Haskell functions to automically intertwine the base functors of the given types.

Synopsis

Template Haskell helpers

entangleFunctors :: [(Name, Name)] -> Q [Dec] Source #

Entangle a list of functors. As an example,

entangleFunctors [(''Data, ''Codata)]

will generate

instance SubHom DataF CodataF Data Codata
instance SubType Codata

entanglePair :: Name -> Name -> Q [Dec] Source #

Entangle types, creating a SubHom instance with their base functors. Note that this is rather strict with regards to naming.