*      !"#$%&'()*+,-./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 application 8Abstract 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) :: App (App (Typ (Either A0 A1)) (Typ Int)) (Typ Char)  > undefined :: Ana ([(Bool,())])aundefined :: Ana ([(Bool,())]) :: App (Typ [A0]) (App (App (Typ (A0, A1)) (Typ Bool)) (Typ ())) -   Safe9;<=!A list of error messages"NReturn the groups of mutually dependent entities, with more than one componentOproperMutualGroups Just (M.fromList [("a",["b","c"]),("b",["a","c"]),("c",[])])Right [["b","a"]]#0Return the groups of mutually dependent entitiesImutualGroups Just (M.fromList [("a",["b","c"]),("b",["a","c"]),("c",[])])Right [["c"],["b","a"]]$eReturn the transitive closure of an element in a graph of dependencies specified as an adjacency listftransitiveClosure Just (M.fromList [("a",["b","c"]),("b",["b","d","d","c"]),("c",[]),("d",["a"])]) "b"Right ["c","a","d","b"]ftransitiveClosure Just (M.fromList [("a",["b","c"]),("b",["b","d","d","c"]),("c",[]),("d",["a"])]) "c" Right ["c"]%FEither an error or a valid value type EitherError a = Either String aGEither errors or a valid value type EitherErrors a = Either [String] a+FIntercalate a dot between the non empty elements of a list of strings. dotted []""dotted ["","bc","de"]"bc.de"dotted ["bc","","de"]"bc.de"!"#$%&'()*+, !"#$%&'()*+"#$!%& '()*+!"#$%&'()*+,Safe 234579;<=/. Simple name0A fully qualified Haskell name5A reference to a type6 Type variable7Type reference8>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 SA-The constructor name, unique in the data typeB{Constructor fields, they can be either unnamed (Left case) or named (Right case) If they are named, they must all be namedC(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 M)E'The name of the data type (for example Bool for  data Bool)F?The number of type parameters/variable (up to a maximum of 255)GThe constructors, if presentHeA map of all the ADTs that are directly or indirectly referred by a type, indexed by a type referenceIKThe 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 M)UexRef: type used to represent a reference to a type in the type name (for example 0)K.The type application corresponding to the typeL,The environment in which the type is definedMReference to an Haskell TypeN Haskell TypeO Haskell ADTPHaskell TypeModelQHaskell EnvironmentR!The ADTs defined in the TypeModelS3Return the list of constructors in definition orderTDConvert a (possibly empty) list of constructors in (maybe) a ConTreeUReturn just the field typesV=Return just the field names (or an empty list if unspecified)W?Return the binary encoding and parameter types of a constructorThe binary encoding is the sequence of Left (False) and Right (True) turns needed to reach the constructor from the constructor tree rootXJMap on the constructor types (used for example when eliminating variables)Y!Map over a constructor tree namesZ"Fold over a constructor tree names[+Extract list of types in a constructor tree\)Fold over the types in a constructor tree]4Map over the names of an ADT and of its constructors^Convert from Type to TypeN_Convert from TypeN to Type`!Returns the list of nested TypeNs4nestedTypeNs $ TypeN "F" [TypeN "G" [],TypeN "Z" []]A[TypeN "F" [TypeN "G" [],TypeN "Z" []],TypeN "G" [],TypeN "Z" []]LnestedTypeNs $ TypeN "F" [TypeN "G" [TypeN "H" [TypeN "L" []]],TypeN "Z" []][TypeN "F" [TypeN "G" [TypeN "H" [TypeN "L" []]],TypeN "Z" []],TypeN "G" [TypeN "H" [TypeN "L" []]],TypeN "H" [TypeN "L" []],TypeN "L" [],TypeN "Z" []]aoRemove variable references (for example if we know that a type is fully saturated and cannot contain variables)bExtract referencec2Return the qualified name, minus the package name.+Parse the string as a QualName, if possibleparseQualName "ab.cd.ef.gh"DRight (QualName {pkgName = "ab", mdlName = "cd.ef", locName = "gh"})dESolve all references in a data structure, using the given environmenteESolve a key in an environment, returns an error if the key is missing>./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV./0123456789:;<=>@?BACDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde:IJKLHRCDEFG>?@AB=:;<89`567./01234c]^_TSWYZX[\UVQPONMedab)./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijSafe9:;LcCompact representation: a value enveloped in CompactPretty will have only its first lines displayed.Convert a variable number (0,1,..) to a name (a,b,..).Convert a variable number (0,1,..) to a name (a,b,..)Intercalate with a spaceIntercalate with a new lineEIntercalate a dot between the non empty elements of a list of stringsWXYZ[\]   WXYZ[\]SafeQR&Environment used while capturing model^The stack of entered types_The environment#Run the model capturing computation Enter a type`YReturns 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 a^_`  a^_`Safe69:;QRT bbHelper 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 N0Helper class used to capture the type parameters#Return the model for the given typeUse 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))yDatatypes with single constructor only instance (GModel a, Datatype d, Constructor c) => GModel (M1 D d (M1 C c a)) where6TypeLits are used to represent data type's parameters.bcdefghijk  bcdefghijkSafe Safe      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV   !"#$%&'()*+./0123456789:;<=>@?BACDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdel   !"#$%&'()*+,-./0123456789:;<=>?@@AABCDEFGHHIJKLMNMOPQQRSTUVVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                           ! " # # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; 0 1 2 3 4 5 < = > ? @ A B C D E F G H I J K L M N O P Q R S T U VWWXYZ[\]^_`abcdefghij"model-0.4.1-CvaANwo5PCP1hfOYdHNcAdData.Model.TypesData.Model.UtilData.Model.EnvData.Model.Pretty Type.ANat Type.AnalyseData.Model.ClassData.Model.InstancesGHCGenerics Data.Modelbase Data.ProxyProxy*convertible-1.1.1.0-2huR7S7QXmPJFQt2mlnJqBData.Convertible.Baseconvert ConvertResult safeConvert ConvertibleconvErrorMessage convDestTypeconvSourceTypeconvSourceValue ConvertErrortransformers-0.5.2.0Control.Monad.Trans.State.LazyStatepretty-1.1.3.3Text.PrettyPrint.HughesPJClass prettyShow pPrintListpPrint pPrintPrecPrettyA9A8A7A6A5A4A3A2A1A0ANatanatValTypAppAnaErrorsproperMutualGroups mutualGroupstransitiveClosuretoErrorsnoErrorserrorToConvertResulterrorsToConvertResultconvertResultToErrorconvertResultToErrorsdotted$fConvertible[][]$fShowRecStateNameQualNamepkgNamemdlNamelocNameTypeRefTypVarTypRefTypeNTypeTypeConTypeAppFieldsConTreeCon constrName constrFieldsADTdeclNamedeclNumParametersdeclConsTypeEnv TypeModeltypeNametypeEnvHTypeRefHTypeHADT HTypeModelHTypeEnvtypeADTs constructorscontree fieldsTypes fieldsNamesconstructorInfoconTreeTypeMapconTreeNameMapconTreeNameFoldconTreeTypeListconTreeTypeFoldMap adtNamesMaptypeNtypeA nestedTypeNsunVargetHRefqualNamesolveAllsolve$fConvertibleQualName[]$fConvertible[]QualName$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 $fGenericName CompactPrettyvarPvarCspacedPvspacedPdottedP$fPrettyPrettyType $fPrettyDoc $fPrettyName$fPrettyQualName $fPrettyTypeN $fPrettyType$fPrettyTypeRef$fPrettyEither $fPretty(,)$fPrettyConTree $fPrettyADT$fPrettyTypeModel$fPrettyCompactPrettyEnvwithEnventerCtxaddDefcloseCtx $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:<>::$$:ShowTypeErrorRecStateseenerrorsexecRec parseQualName GHC.GenericsGenericRepfromtoGeneric1Rep1from1to1Datatype moduleName datatypeName packageName isNewtype ConstructorconName conFixity conIsRecordSelectorselNameselSourceUnpackednessselSourceStrictnessselDecidedStrictnessV1U1Par1unPar1Rec1unRec1K1unK1M1unM1:+:L1R1:*::.:Comp1unComp1RDCSRec0D1C1S1URecUAddrUCharUDoubleUFloatUIntUWorduWord#uInt#uFloat#uDouble#uChar#uAddr#precFixityPrefixInfixFixityIPrefixIInfixI AssociativityLeftAssociativeRightAssociativeNotAssociativeSourceUnpackedness SourceUnpackSourceNoUnpackNoSourceUnpackednessSourceStrictness SourceLazy SourceStrictNoSourceStrictnessDecidedStrictness DecidedLazy DecidedStrict DecidedUnpackMetaMetaDataMetaConsMetaSel PrettyTypeshorter localName prettyADTvarsprintPrettyTypectxenvinCtxGModelgconsgcontreegtypegtypeNasTypePaddCT_unLunRnotThere