úÎ7¸4¾ None!"023468<=JK   None!"023468<=JKcCreates a functions translating from an ADT to its isomorphic multi-sorted compositional data type Fimport qualified Foo as F ... type ArithTerm = Term Arith deriveTrans ''Arith [''Arith, ''Atom, ''Lit] ArithTerm  will create ÿctranslate :: F.Arith -> ArithTerm ArithL translate = trans class Trans a l where trans a -> ArithTerm l instance Trans F.Arith ArithL where trans (F.Add x y) = iAdd (trans x) (trans y) instance Trans F.Atom AtomL where trans (F.Var s) = iVar s trans (F.Const x) = iConst (trans x) instance Trans F.Lit LitL where trans (F.Lit n) = iLit n Example: Ntranslate :: J.CompilationUnit -> JavaTerm CompilationUnitL translate = trans Example: .class Trans a l where trans a -> JavaTerm l Example: ‹instance Trans J.CompilationUnit CompilationUnitL where trans (J.CompilationUnit x y z) = iCompilationUnit (trans x) (trans y) (trans z) None!"023468<=JK Creates an  untranslate function inverting the  translate function created by  deriveTrans. Ximport qualified Foo as F type ArithTerm = Term (Arith :+: Atom :+: Lit) deriveUntrans ['' F.Arith, ''F.Atom, ''F.Lit] (TH.ConT '' ArithTerm)  will create ÿõtype family Targ l newtype T l = T {t :: Targ l} class Untrans f where untrans :: Alg f t untranslate :: ArithTerm l -> Targ l untranslate = t . cata untrans type instance Targ ArithL = F.Arith instance Untrans Arith where untrans (Add x y) = T $ F.Add (t x) (t y) type instance Targ AtomL = F.Atom instance Untrans Atom where untrans (Var s) = T $ F.Var s untrans (Const x) = T $ F.Const (t x) type instance Targ LitL = F.Lit instance Untrans Lit where untrans (Lit n) = T $ F.Lit n 8Note that you will need to manually provide an instance +(Untrans f, Untrans g) => Untrans (f :+: g) due to phase issues.None!"023468<=JKNone!"023468<=JK WFinds all type names transitively referred to by a given type, removing standard types!IFinds the fixpoint of a monotone monadic function using chaotic iteration"mapM for Data.Set #$ !"%&'()  #$ !"%&'()None!"023468<=JKLDeclares a multi-sorted compositional datatype isomorphic to the given ADT.e.g. *import qualified Foo as F deriveMultiComp ''F.Arith  will create ÷data ArithL data AtomL data LitL data Arith e l where Add :: e AtomL -> e AtomL -> Arith e ArithL data Atom e l where Var :: String -> Atom e AtomL Const :: e LitL -> Atom e AtomL data Lit (e :: * -> *) l where Lit :: Int -> Lit e LitL e.g. generateNameLists ''Arith  will create origASTTypes = [mkName  Foo.Arith , mkName Foo.Atom , mkName Foo.Lit] newASTTypes = [mkName Arith , mkName Atom , mkName Lit"] newASTLabels = map ConT [mkName ArithL, mkName "AtomL', mkName LitL] Folds together names with (*).e.g. %import qualified Foo as F deriveMult '' F.Arith makeSumType "ArithSig" [''Arith, ''Atom, ''Lit]  will create 'type ArithSig = Arith :+: Atom :+: Lit  You can use ) to avoid spelling out the names manuallyNone!"023468<=JK+,-./0123456789+,-./0123456789:      !"#$%&'()*+,-./0123456789:;<=>?@Acomptrans-0.1.0.3Data.Comp.TransData.Comp.Derive.GenericData.Comp.Trans.NamesData.Comp.Trans.DeriveTransData.Comp.Trans.DeriveUntransData.Comp.Trans.DeriveMultiData.Comp.Trans.Collect deriveTrans deriveUntransderiveMultiCompgenerateNameLists getLabels makeSumTypeGenericExamplemakeInstancesLike makeGenericstandardNameSet baseTypesgetLab transNamenameLabsmartConstrName modNameBasesimplifyDataInf extractConmkFuncmkClass mkInstancemkClausemkTarg mkWrappermkFn deriveMultimkGADTmkCon unfixType collectTypesfixpointmapSetM ExtractNames extractNames collectTypes'$fExtractNamesType$fExtractNames(,,)$fExtractNames(,)$fExtractNamesCon compdata-0.9Data.Comp.Multi.Ops:+:makeInstanceLikemakeGenericInstance genericTpmakeGPatmakeGExpmakeEPatmakeEExp addSumPat addSumExp matchingCon extractLabcxtlessUnifiable $fGeneric:&: $fGenericCxt $fGeneric:+: