ql`      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Safe ,DQRT Envelope to get Nats with * kind*Convert a Nat to the corresponding IntegeranatVal (undefined::A5)5  *     Safe+,DQR A data typeType application8Abstract a concrete type to a type applied to variables.RMore precisely: to a meta-representation where type application is represented by , data types are marked by " and variables are represented by  types.vBUG: Silently fails for types with more than 9 parameters (should be defined recursively, if you know how let me know) Examples:undefined :: Ana (Maybe Char)@undefined :: Ana (Maybe Char) :: App (Typ (Maybe A0)) (Typ Char)"undefined :: Ana (Either Int Char)"undefined :: Ana (Either Int Char)8 :: App (App (Typ (Either A0 A1)) (Typ Int)) (Typ Char)undefined :: Ana ([(Bool,())])undefined :: Ana ([(Bool,())])B :: App (Typ [A0]) (App (App (Typ (A0, A1)) (Typ Bool)) (Typ ()))- Safe234579;( Simple nameA fully qualified Haskell nameA reference to a type Type variable Type reference!>Another representation of a type, sometime easier to work with#A type$Type constructor (Bool,Maybe,..)%Type application&+Constructors are assembled in a binary tree(Constructor tree.GConstructors are disposed in an optimally balanced, right heavier tree:For example, the data type: (data N = One | Two | Three | Four | Five9Would have its contructors ordered in the following tree: K | | | One Two Three | Four Five7To get a list of constructor in declaration order, use :)-The constructor name, unique in the data type*{Constructor fields, they can be either unnamed (Left case) or named (Right case) If they are named, they must all be named+(Simple algebraic data type (not a GADT)::declName: type used to represent the name of the data type:consName: type used to represent the name of a constructorwref: type used to represent a reference to a type or a type variable inside the data type definition (for example 5)-'The name of the data type (for example Bool for  data Bool).?The number of type parameters/variable (up to a maximum of 255)/The constructors, if present0eA map of all the ADTs that are directly or indirectly referred by a type, indexed by a type reference1KThe complete model of a type, a reference to the type plus its environment:8adtName: type used to represent the name of a data type:consName: type used to represent the name of a constructorwinRef: type used to represent a reference to a type or a type variable inside the data type definition (for example 5)UexRef: type used to represent a reference to a type in the type name (for example )3.The type application corresponding to the type4,The environment in which the type is defined5Reference to an Haskell Type6 Haskell Type7 Haskell ADT8Haskell TypeModel9Haskell Environment:3Return the list of constructors in definition order;Return just the field types<=Return just the field names (or an empty list if unspecified)=JMap on the constructor types (used for example when eliminating variables)>!Map over a constructor tree names?+Extract list of types in a constructor tree@)Fold over the types in a constructor treeA4Map over the names of an ADT and of its constructorsBConvert from Type to TypeNCConvert from TypeN to TypeD2Return the qualified name, minus the package name.EoRemove variable references (for example if we know that a type is fully saturated and cannot contain variables)FESolve all references in a data structure, using the given environmentGESolve a key in an environment, returns an error if the key is missing7 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM      !"#$%&'()*+, !"#$%&('*)+,-./0123456789:;<=>?@ABCDEFG312340+,-./&'()*#$%!" DABC:>=?@;<98765GFE" !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMSafe9;LSeparate with a spaceSeparate with a new lineIntercalate with -./01234  ./01234SafeQR&Environment used while capturing model5The stack of entered types6The environment#Run the model capturing computation Enter a type7YReturns True if we have already seen this data type and do not need to analyse it further,Add a new data type model to the environmentLeave current type 85678567Safe69:;QRT 9bHelper class, uses Generics to capture the model of a data type Adapted from the Beamable packageClass of types whose model can be calculated Instances are derived automatically, provided that the data type has an instance for  eGiven a type proxy, update the environment with the ADTs referred by it and return the corresponding 60Helper class used to capture the type parameters#Return the model for the given typeSUse the given constructors tree as model for the given type, returns the build type@Exported so that it can be used to overwrite default definitions Constructors$Datatypes with multiple constructors>Needed to avoid overlapping instances with (M1 D d (M1 C c a))&Datatypes with single constructor only6TypeLits are used to represent data type's parameters.9:;<=>?@AB9:;<=>?@ABSafe Safe      !"#$%&'()*+, !"#$%&('*)+,-./0123456789:;<=>?@ABCDEFGC    !"#$%&''(()*+,-.//012343567789:;<<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                        ! " # $ % & ' ( ) * + , -.//0123456789:;<=>?@AB!model-0.2.1-aeFmxMSxIPFqPPLvmvQ1VData.Model.TypesData.Model.PrettyData.Model.Env Type.ANat Type.AnalyseData.Model.ClassData.Model.InstancesGHCGenerics Data.Modelbase Data.ProxyProxypretty-1.1.3.3Text.PrettyPrint.HughesPJClass prettyShow pPrintListpPrint pPrintPrecPrettytransformers-0.5.2.0Control.Monad.Trans.State.LazyStateA9A8A7A6A5A4A3A2A1A0ANatanatValTypAppAnaNameQualNamepkgNamemdlNamelocNameTypeRefTypVarTypRefTypeNTypeTypeConTypeAppConTreeCon constrName constrFieldsADTdeclNamedeclNumParametersdeclConsTypeEnv TypeModeltypeNametypeEnvHTypeRefHTypeHADT HTypeModelHTypeEnv constructors fieldsTypes fieldsNamesconTreeTypeMapconTreeNameMapconTreeTypeListconTreeTypeFoldMap adtNamesMaptypeNtypeAqualNameunVarsolveAllsolve$fStringLikeName$fStringLike[]$fStringLikeQualName$fTraversableConTree$fFoldableConTree$fFunctorConTree$fEqType $fOrdType $fShowType $fNFDataType $fGenericType $fFunctorType$fFoldableType$fTraversableType $fEqConTree $fOrdConTree $fShowConTree$fNFDataConTree$fGenericConTree$fEqADT$fOrdADT $fShowADT $fNFDataADT $fGenericADT $fFunctorADT $fFoldableADT$fTraversableADT $fEqTypeModel$fOrdTypeModel$fShowTypeModel$fNFDataTypeModel$fGenericTypeModel $fEqTypeN $fOrdTypeN $fReadTypeN $fShowTypeN $fNFDataTypeN$fGenericTypeN$fFunctorTypeN$fFoldableTypeN$fTraversableTypeN $fEqTypeRef $fOrdTypeRef $fShowTypeRef$fNFDataTypeRef$fGenericTypeRef$fFunctorTypeRef$fFoldableTypeRef$fTraversableTypeRef $fEqQualName $fOrdQualName$fShowQualName$fNFDataQualName$fGenericQualName$fEqName $fOrdName $fShowName $fNFDataName $fGenericNamevarPspacedPvspacedPdotted $fPrettyDoc $fPrettyName$fPrettyQualName $fPrettyTypeN$fPrettyPrettyType $fPrettyType$fPrettyTypeRef$fPrettyConTree $fPrettyADT$fPrettyTypeModelEnvwithEnventerCtxaddDefcloseCtx $fShowEnvModelenvTypeAsTypeasType typeModeluseCT $fGModelK1 $fGModelU1 $fGModel:*: $fGModelM1 $fGModel:+: $fGModelM10 $fGModelM11 $fGModelM12 $fGModelM13 $fModelANat $fAsTypeApp $fAsTypeTyp $fModelEither $fModelMaybe $fModelBool GHC.TypeLitsKnownNat KnownSymbolghc-prim GHC.TypesNatSymbol+*^<=?- CmpSymbolCmpNat TypeError sameSymbolsameNat someSymbolVal someNatVal symbolVal'natVal' symbolValnatValSomeNat SomeSymbol<= ErrorMessageText:<>::$$:ShowType GHC.GenericsGenericRepfromtoGeneric1Rep1from1to1Datatype moduleName datatypeName packageName isNewtype ConstructorconName conFixity conIsRecordSelectorselNameselSourceUnpackednessselSourceStrictnessselDecidedStrictnessV1U1Par1unPar1Rec1unRec1K1unK1M1unM1:+:L1R1:*::.:Comp1unComp1RDCSRec0D1C1S1URecUAddrUCharUDoubleUFloatUIntUWorduWord#uInt#uFloat#uDouble#uChar#uAddr#precFixityPrefixInfixFixityIPrefixIInfixI AssociativityLeftAssociativeRightAssociativeNotAssociativeSourceUnpackedness SourceUnpackSourceNoUnpackNoSourceUnpackednessSourceStrictness SourceLazy SourceStrictNoSourceStrictnessDecidedStrictness DecidedLazy DecidedStrict DecidedUnpackMetaMetaDataMetaConsMetaSelGHC.Base. PrettyType stringADT localName prettyADTvarsprintPrettyTypectxenvinCtxGModelgconsgcontreegtypegtypeNasTypePaddCT_unLunRnotThere