-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Derive a model of a data type using Generics -- -- See the online tutorial. @package model @version 0.5 module Data.Convertible.Tiny -- | Convert from one type of data to another. Raises an exception if there -- is an error with the conversion. For a function that does not raise an -- exception in that case, see safeConvert. convert :: Convertible a b => a -> b -- | A typeclass that represents something that can be converted. A -- Convertible a b instance represents an a that can be -- converted to a b. class Convertible a b -- | Convert a to b, returning Right on success and Left -- on error. For a simpler interface, see convert. safeConvert :: Convertible a b => a -> ConvertResult b -- | The result of a safe conversion via safeConvert. type ConvertResult a = Either ConvertError a -- | How we indicate that there was an error. data ConvertError ConvertError :: String -> String -> String -> String -> ConvertError [convSourceValue] :: ConvertError -> String [convSourceType] :: ConvertError -> String [convDestType] :: ConvertError -> String [convErrorMessage] :: ConvertError -> String convError :: (Show a, Typeable a, Typeable b) => String -> a -> ConvertResult b prettyConvertError :: ConvertError -> String instance Data.Convertible.Base.Convertible a a module Data.Model.Util -- | A list of error messages type Errors = [Error] toErrors :: Bifunctor p => p a c -> p [a] c noErrors :: Errors -> Bool -- | Prefix errors with a contextual note errsInContext :: (Convertible ctx String, Bifunctor p) => ctx -> p [String] c -> p [String] c -- | Prefix a list of strings with a contextual note -- --
--   >>> inContext "0/0" ["Zero denominator"]
--   ["In 0/0: Zero denominator"]
--   
inContext :: Convertible ctx String => ctx -> [String] -> [String] errorToConvertResult :: (Typeable b, Typeable a, Show a) => (a -> Either Error b) -> a -> ConvertResult b -- |
--   >>> errorsToConvertResult (const (Left ["Bad format","Invalid value"])) ".." :: ConvertResult Int
--   Left (ConvertError {convSourceValue = "\"..\"", convSourceType = "[Char]", convDestType = "Int", convErrorMessage = "Bad format, Invalid value"})
--   
errorsToConvertResult :: (Typeable b, Typeable t, Show t) => (t -> Either Errors b) -> t -> ConvertResult b convertResultToError :: Bifunctor p => p ConvertError c -> p String c convertResultToErrors :: Bifunctor p => p ConvertError c -> p [String] c -- |
--   >>> import Data.Word
--   
--   >>> convertOrError 'a' :: Either Error Word
--   Right 97
--   
-- --
--   >>> convertOrError (1E50::Double) :: Either Error Word64
--   Left "Convertible: error converting source data 1.0e50 of type Double to type Word64: Input value outside of bounds: (0,18446744073709551615)"
--   
convertOrError :: Convertible a c => a -> Either String c -- | A typeclass that represents something that can be converted. A -- Convertible a b instance represents an a that can be -- converted to a b. class Convertible a b -- | Convert a to b, returning Right on success and Left -- on error. For a simpler interface, see convert. safeConvert :: Convertible a b => a -> ConvertResult b -- | Convert from one type of data to another. Raises an exception if there -- is an error with the conversion. For a function that does not raise an -- exception in that case, see safeConvert. convert :: Convertible a b => a -> b -- | The result of a safe conversion via safeConvert. type ConvertResult a = Either ConvertError a -- | How we indicate that there was an error. data ConvertError ConvertError :: String -> String -> String -> String -> ConvertError [convSourceValue] :: ConvertError -> String [convSourceType] :: ConvertError -> String [convDestType] :: ConvertError -> String [convErrorMessage] :: ConvertError -> String -- | Intercalate a dot between the non empty elements of a list of strings. -- --
--   >>> dotted []
--   ""
--   
-- --
--   >>> dotted ["","bc","de"]
--   "bc.de"
--   
-- --
--   >>> dotted ["bc","","de"]
--   "bc.de"
--   
dotted :: [String] -> String -- | A model for simple algebraic data types. module Data.Model.Types -- | The complete model of a type, a reference to the type plus its -- environment: -- -- data TypeModel adtName consName inRef exRef TypeModel :: Type exRef -> TypeEnv adtName consName inRef exRef -> TypeModel adtName consName inRef exRef -- | The type application corresponding to the type [typeName] :: TypeModel adtName consName inRef exRef -> Type exRef -- | The environment in which the type is defined [typeEnv] :: TypeModel adtName consName inRef exRef -> TypeEnv adtName consName inRef exRef -- | A map of all the ADTs that are directly or indirectly referred by a -- type, indexed by a type reference type TypeEnv adtName consName inRef exRef = Map exRef (ADT adtName consName inRef) -- | The ADTs defined in the TypeModel typeADTs :: TypeModel adtName consName inRef k -> [ADT adtName consName inRef] -- | Simple algebraic data type (not a GADT): -- -- data ADT name consName ref ADT :: name -> Word8 -> Maybe (ConTree consName ref) -> ADT name consName ref -- | The name of the data type (for example Bool for data -- Bool) [declName] :: ADT name consName ref -> name -- | The number of type parameters/variable (up to a maximum of 255) [declNumParameters] :: ADT name consName ref -> Word8 -- | The constructors, if present [declCons] :: ADT name consName ref -> Maybe (ConTree consName ref) -- | Constructors are assembled in a binary tree data ConTree name ref Con :: name -> Fields name ref -> ConTree name ref -- | The constructor name, unique in the data type [constrName] :: ConTree name ref -> name -- | Constructor fields, they can be either unnamed (Left case) or named -- (Right case) If they are named, they must all be named [constrFields] :: ConTree name ref -> Fields name ref -- | Constructor tree. -- -- Constructors are disposed in an optimally balanced, right heavier -- tree: -- -- For example, the data type: -- --
--   data N = One | Two | Three | Four | Five
--   
-- -- Would have its contructors ordered in the following tree: -- --
--           |
--      |            |
--   One Two   Three   |
--                 Four Five
--   
-- -- To get a list of constructor in declaration order, use -- constructors ConTree :: ConTree name ref -> ConTree name ref -> ConTree name ref type Fields name ref = Either [Type ref] [(name, Type ref)] -- | A type data Type ref -- | Type constructor (Bool,Maybe,..) TypeCon :: ref -> Type ref -- | Type application TypeApp :: Type ref -> Type ref -> Type ref -- | Another representation of a type, sometime easier to work with data TypeN r TypeN :: r -> [TypeN r] -> TypeN r -- | Returns the list of nested TypeNs -- --
--   >>> nestedTypeNs $ TypeN "F" [TypeN "G" [],TypeN "Z" []]
--   [TypeN "F" [TypeN "G" [],TypeN "Z" []],TypeN "G" [],TypeN "Z" []]
--   
-- --
--   >>> nestedTypeNs $ 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" []]
--   
nestedTypeNs :: TypeN t -> [TypeN t] -- | A reference to a type data TypeRef name -- | Type variable TypVar :: Word8 -> TypeRef name -- | Type reference TypRef :: name -> TypeRef name -- | Simple name newtype Name Name :: String -> Name -- | A fully qualified Haskell name data QualName QualName :: String -> QualName [pkgName, mdlName, locName] :: QualName -> String -- | Return the qualified name, minus the package name. -- --
--   >>> qualName (QualName {pkgName = "ab", mdlName = "cd.ef", locName = "gh"})
--   "cd.ef.gh"
--   
qualName :: QualName -> String -- | Map over the names of an ADT and of its constructors adtNamesMap :: (adtName1 -> adtName2) -> (consName1 -> consName2) -> ADT adtName1 consName1 ref -> ADT adtName2 consName2 ref -- | Convert from Type to TypeN typeN :: Type r -> TypeN r -- | Convert from TypeN to Type typeA :: TypeN ref -> Type ref -- | Convert a (possibly empty) list of constructors in (maybe) a ConTree contree :: [(name, Fields name ref)] -> Maybe (ConTree name ref) -- | Return the list of constructors in definition order constructors :: ConTree name ref -> [(name, Fields name ref)] -- | Return the binary encoding and parameter types of a constructor -- -- The binary encoding is the sequence of Left (False) and Right (True) -- turns needed to reach the constructor from the constructor tree root constructorInfo :: Eq consName => consName -> ConTree consName t -> Maybe ([Bool], [Type t]) -- | Map over a constructor tree names conTreeNameMap :: (name -> name2) -> ConTree name t -> ConTree name2 t -- | Fold over a constructor tree names conTreeNameFold :: Monoid a => (name -> a) -> ConTree name t -> a -- | Map on the constructor types (used for example when eliminating -- variables) conTreeTypeMap :: (Type t -> Type ref) -> ConTree name t -> ConTree name ref -- | Extract list of types in a constructor tree conTreeTypeList :: ConTree name t -> [Type t] -- | Fold over the types in a constructor tree conTreeTypeFoldMap :: Monoid a => (Type t -> a) -> ConTree name t -> a -- | Return just the field types fieldsTypes :: Either [b] [(a, b)] -> [b] -- | Return just the field names (or an empty list if unspecified) fieldsNames :: Either t [(a, t1)] -> [t1] -- | Haskell Environment type HTypeEnv = TypeEnv String String (TypeRef QualName) QualName -- | Haskell TypeModel type HTypeModel = TypeModel String String (TypeRef QualName) QualName -- | Haskell ADT type HADT = ADT String String HTypeRef -- | Haskell Type type HType = Type HTypeRef -- | Reference to an Haskell Type type HTypeRef = TypeRef QualName -- | Solve a key in an environment, returns an error if the key is missing solve :: (Ord k, Show k) => k -> Map k a -> a -- | Solve all references in a data structure, using the given environment solveAll :: (Functor f, Show k, Ord k) => Map k b -> f k -> f b -- | Remove variable references (for example if we know that a type is -- fully saturated and cannot contain variables) unVar :: TypeRef t -> t -- | Extract reference getHRef :: TypeRef a -> Maybe a -- | Proxy is a type that holds no data, but has a phantom parameter -- of arbitrary type (or even kind). Its use is to provide type -- information, even though there is no value available of that type (or -- it may be too costly to create one). -- -- Historically, Proxy :: Proxy a is a safer -- alternative to the 'undefined :: a' idiom. -- --
--   >>> Proxy :: Proxy (Void, Int -> Int)
--   Proxy
--   
-- -- Proxy can even hold types of higher kinds, -- --
--   >>> Proxy :: Proxy Either
--   Proxy
--   
-- --
--   >>> Proxy :: Proxy Functor
--   Proxy
--   
-- --
--   >>> Proxy :: Proxy complicatedStructure
--   Proxy
--   
data Proxy (t :: k) :: forall k. () => k -> Type Proxy :: Proxy instance GHC.Generics.Generic Data.Model.Types.Name instance Control.DeepSeq.NFData Data.Model.Types.Name instance GHC.Show.Show Data.Model.Types.Name instance GHC.Classes.Ord Data.Model.Types.Name instance GHC.Classes.Eq Data.Model.Types.Name instance GHC.Generics.Generic Data.Model.Types.QualName instance Control.DeepSeq.NFData Data.Model.Types.QualName instance GHC.Show.Show Data.Model.Types.QualName instance GHC.Classes.Ord Data.Model.Types.QualName instance GHC.Classes.Eq Data.Model.Types.QualName instance Data.Traversable.Traversable Data.Model.Types.TypeRef instance Data.Foldable.Foldable Data.Model.Types.TypeRef instance GHC.Base.Functor Data.Model.Types.TypeRef instance GHC.Generics.Generic (Data.Model.Types.TypeRef name) instance Control.DeepSeq.NFData name => Control.DeepSeq.NFData (Data.Model.Types.TypeRef name) instance GHC.Show.Show name => GHC.Show.Show (Data.Model.Types.TypeRef name) instance GHC.Classes.Ord name => GHC.Classes.Ord (Data.Model.Types.TypeRef name) instance GHC.Classes.Eq name => GHC.Classes.Eq (Data.Model.Types.TypeRef name) instance Data.Traversable.Traversable Data.Model.Types.TypeN instance Data.Foldable.Foldable Data.Model.Types.TypeN instance GHC.Base.Functor Data.Model.Types.TypeN instance GHC.Generics.Generic (Data.Model.Types.TypeN r) instance Control.DeepSeq.NFData r => Control.DeepSeq.NFData (Data.Model.Types.TypeN r) instance GHC.Show.Show r => GHC.Show.Show (Data.Model.Types.TypeN r) instance GHC.Read.Read r => GHC.Read.Read (Data.Model.Types.TypeN r) instance GHC.Classes.Ord r => GHC.Classes.Ord (Data.Model.Types.TypeN r) instance GHC.Classes.Eq r => GHC.Classes.Eq (Data.Model.Types.TypeN r) instance GHC.Generics.Generic (Data.Model.Types.TypeModel adtName consName inRef exRef) instance (Control.DeepSeq.NFData exRef, Control.DeepSeq.NFData adtName, Control.DeepSeq.NFData consName, Control.DeepSeq.NFData inRef) => Control.DeepSeq.NFData (Data.Model.Types.TypeModel adtName consName inRef exRef) instance (GHC.Show.Show exRef, GHC.Show.Show adtName, GHC.Show.Show consName, GHC.Show.Show inRef) => GHC.Show.Show (Data.Model.Types.TypeModel adtName consName inRef exRef) instance (GHC.Classes.Ord exRef, GHC.Classes.Ord adtName, GHC.Classes.Ord consName, GHC.Classes.Ord inRef) => GHC.Classes.Ord (Data.Model.Types.TypeModel adtName consName inRef exRef) instance (GHC.Classes.Eq exRef, GHC.Classes.Eq adtName, GHC.Classes.Eq consName, GHC.Classes.Eq inRef) => GHC.Classes.Eq (Data.Model.Types.TypeModel adtName consName inRef exRef) instance Data.Traversable.Traversable (Data.Model.Types.ADT name consName) instance Data.Foldable.Foldable (Data.Model.Types.ADT name consName) instance GHC.Base.Functor (Data.Model.Types.ADT name consName) instance GHC.Generics.Generic (Data.Model.Types.ADT name consName ref) instance (Control.DeepSeq.NFData name, Control.DeepSeq.NFData consName, Control.DeepSeq.NFData ref) => Control.DeepSeq.NFData (Data.Model.Types.ADT name consName ref) instance (GHC.Show.Show name, GHC.Show.Show consName, GHC.Show.Show ref) => GHC.Show.Show (Data.Model.Types.ADT name consName ref) instance (GHC.Classes.Ord name, GHC.Classes.Ord consName, GHC.Classes.Ord ref) => GHC.Classes.Ord (Data.Model.Types.ADT name consName ref) instance (GHC.Classes.Eq name, GHC.Classes.Eq consName, GHC.Classes.Eq ref) => GHC.Classes.Eq (Data.Model.Types.ADT name consName ref) instance GHC.Generics.Generic (Data.Model.Types.ConTree name ref) instance (Control.DeepSeq.NFData name, Control.DeepSeq.NFData ref) => Control.DeepSeq.NFData (Data.Model.Types.ConTree name ref) instance (GHC.Show.Show name, GHC.Show.Show ref) => GHC.Show.Show (Data.Model.Types.ConTree name ref) instance (GHC.Classes.Ord name, GHC.Classes.Ord ref) => GHC.Classes.Ord (Data.Model.Types.ConTree name ref) instance (GHC.Classes.Eq name, GHC.Classes.Eq ref) => GHC.Classes.Eq (Data.Model.Types.ConTree name ref) instance Data.Traversable.Traversable Data.Model.Types.Type instance Data.Foldable.Foldable Data.Model.Types.Type instance GHC.Base.Functor Data.Model.Types.Type instance GHC.Generics.Generic (Data.Model.Types.Type ref) instance Control.DeepSeq.NFData ref => Control.DeepSeq.NFData (Data.Model.Types.Type ref) instance GHC.Show.Show ref => GHC.Show.Show (Data.Model.Types.Type ref) instance GHC.Classes.Ord ref => GHC.Classes.Ord (Data.Model.Types.Type ref) instance GHC.Classes.Eq ref => GHC.Classes.Eq (Data.Model.Types.Type ref) instance Data.Convertible.Base.Convertible GHC.Base.String Data.Model.Types.QualName instance Data.Convertible.Base.Convertible Data.Model.Types.QualName GHC.Base.String instance GHC.Base.Functor (Data.Model.Types.ConTree name) instance Data.Foldable.Foldable (Data.Model.Types.ConTree name) instance Data.Traversable.Traversable (Data.Model.Types.ConTree name) -- | Environment used while capturing model module Data.Model.Env -- | A state monad parameterized by the type s of the state to -- carry. -- -- The return function leaves the state unchanged, while -- >>= uses the final state of the first computation as -- the initial state of the second. type State s = StateT s Identity -- | Environment used while capturing model data Env -- | Run the model capturing computation withEnv :: State Env HType -> HTypeModel -- | Enter a type enterCtx :: QualName -> State Env Bool -- | Add a new data type model to the environment addDef :: QualName -> HADT -> State Env () -- | Leave current type closeCtx :: State Env () instance GHC.Show.Show Data.Model.Env.Env -- | Pretty instances for the model types module Data.Model.Pretty -- | Compact representation: a value enveloped in CompactPretty will have -- only its first lines displayed newtype CompactPretty a CompactPretty :: a -> CompactPretty a -- | Intercalate a dot between the non empty elements of a list of strings dottedP :: [String] -> Doc -- | Intercalate with a space spacedP :: Pretty a => [a] -> Doc -- | Intercalate with a new line vspacedP :: Pretty a => [a] -> Doc -- | Convert a variable number (0,1,..) to a name -- (a,b,..) varP :: Integral n => n -> Doc -- | Convert a variable number (0,1,..) to a name -- (a,b,..) varC :: Integral a => a -> Char -- | Pretty printing class. The precedence level is used in a similar way -- as in the Show class. Minimal complete definition is either -- pPrintPrec or pPrint. class Pretty a pPrintPrec :: Pretty a => PrettyLevel -> Rational -> a -> Doc pPrint :: Pretty a => a -> Doc pPrintList :: Pretty a => PrettyLevel -> [a] -> Doc -- | Pretty print a value with the prettyNormal level. prettyShow :: Pretty a => a -> String prettyADT :: (Pretty name, Pretty consName, Pretty ref) => String -> Char -> ADT name consName ref -> Doc instance Text.PrettyPrint.HughesPJClass.Pretty r => Text.PrettyPrint.HughesPJClass.Pretty (Data.Model.Pretty.PrettyType r) instance Text.PrettyPrint.HughesPJClass.Pretty a => Text.PrettyPrint.HughesPJClass.Pretty (Data.Model.Pretty.CompactPretty a) instance (GHC.Base.Functor t, Text.PrettyPrint.HughesPJClass.Pretty (t Data.Model.Types.Name), Text.PrettyPrint.HughesPJClass.Pretty exRef, GHC.Classes.Ord exRef, GHC.Show.Show exRef, Data.Convertible.Base.Convertible adtName GHC.Base.String, Data.Convertible.Base.Convertible consName GHC.Base.String, Data.Convertible.Base.Convertible iref GHC.Base.String) => Text.PrettyPrint.HughesPJClass.Pretty (Data.Model.Types.TypeModel adtName consName (t iref) exRef) instance (Text.PrettyPrint.HughesPJClass.Pretty n, Text.PrettyPrint.HughesPJClass.Pretty cn, Text.PrettyPrint.HughesPJClass.Pretty r) => Text.PrettyPrint.HughesPJClass.Pretty (Data.Model.Types.ADT n cn r) instance (Text.PrettyPrint.HughesPJClass.Pretty name, Text.PrettyPrint.HughesPJClass.Pretty ref) => Text.PrettyPrint.HughesPJClass.Pretty (Data.Model.Types.ConTree name ref) instance (Text.PrettyPrint.HughesPJClass.Pretty name, Text.PrettyPrint.HughesPJClass.Pretty ref) => Text.PrettyPrint.HughesPJClass.Pretty (name, Data.Model.Types.Fields name ref) instance (Text.PrettyPrint.HughesPJClass.Pretty name, Text.PrettyPrint.HughesPJClass.Pretty ref) => Text.PrettyPrint.HughesPJClass.Pretty (Data.Model.Types.Fields name ref) instance Text.PrettyPrint.HughesPJClass.Pretty n => Text.PrettyPrint.HughesPJClass.Pretty (Data.Model.Types.TypeRef n) instance Text.PrettyPrint.HughesPJClass.Pretty r => Text.PrettyPrint.HughesPJClass.Pretty (Data.Model.Types.Type r) instance Text.PrettyPrint.HughesPJClass.Pretty r => Text.PrettyPrint.HughesPJClass.Pretty (Data.Model.Types.TypeN r) instance Text.PrettyPrint.HughesPJClass.Pretty Data.Model.Types.QualName instance Text.PrettyPrint.HughesPJClass.Pretty Data.Model.Types.Name instance Text.PrettyPrint.HughesPJClass.Pretty Text.PrettyPrint.HughesPJ.Doc -- | Nats with * kind module Type.ANat -- | Envelope to get Nats with * kind data ANat (n :: Nat) -- | Convert a Nat to the corresponding Integer -- --
--   >>> anatVal (undefined::A5)
--   5
--   
anatVal :: KnownNat n => ANat n -> Integer type A0 = ANat 0 type A1 = ANat 1 type A2 = ANat 2 type A3 = ANat 3 type A4 = ANat 4 type A5 = ANat 5 type A6 = ANat 6 type A7 = ANat 7 type A8 = ANat 8 type A9 = ANat 9 -- | Utility to abstract parametric types module Type.Analyse -- | Abstract a concrete type to a type applied to variables. -- -- More precisely: to a meta-representation where type application is -- represented by App, data types are marked by Typ and -- variables are represented by ANat types. -- -- BUG: Silently fails for types with more than 9 parameters (should be -- defined recursively, if you know how let me know) -- -- Examples: -- --
--   >>> :kind!  Ana (Maybe Bool)
--   Ana (Maybe Bool) :: *
--   = App (Typ (Maybe A0)) (Typ Bool)
--   
-- --
--   >>> :kind! Ana (Maybe Char)
--   Ana (Maybe Char) :: * 
--   = App (Typ (Maybe A0)) (Typ Char)
--   
-- --
--   >>> :kind! Ana (Either Int (Maybe Bool))
--   Ana (Either Int (Maybe Bool)) :: *
--   = App
--       (App (Typ (Either A0 A1)) (Typ Int))
--       (App (Typ (Maybe A0)) (Typ Bool))
--   
-- --
--   >>> :kind! Ana ([(Bool,())])
--   Ana ([(Bool,())]) :: * 
--   = App (Typ [A0]) (App (App (Typ (A0, A1)) (Typ Bool)) (Typ ()))
--   
type family Ana t -- | Type application data App f a -- | A data type data Typ a module Data.Model.Class -- | Return the model for the given type typeModel :: AsType (Ana a) => Proxy a -> HTypeModel -- | Class of types whose model can be calculated Instances are derived -- automatically, provided that the data type has an instance for -- Generics class (Typeable a, AsType (Ana a)) => Model a -- | Given a type proxy, update the environment with the ADTs referred by -- it and return the corresponding HType envType :: Model a => Proxy a -> State Env HType -- | Given a type proxy, update the environment with the ADTs referred by -- it and return the corresponding HType envType :: (Model a, Generic a, GModel (Rep a)) => Proxy a -> State Env HType -- | Helper class used to capture the type parameters class AsType a asType :: AsType a => a -> State Env HType -- | Use 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 useCT :: Typeable a => Maybe (ConTree String HTypeRef) -> proxy a -> State Env (Type (TypeRef QualName)) -- | Abstract a concrete type to a type applied to variables. -- -- More precisely: to a meta-representation where type application is -- represented by App, data types are marked by Typ and -- variables are represented by ANat types. -- -- BUG: Silently fails for types with more than 9 parameters (should be -- defined recursively, if you know how let me know) -- -- Examples: -- --
--   >>> :kind!  Ana (Maybe Bool)
--   Ana (Maybe Bool) :: *
--   = App (Typ (Maybe A0)) (Typ Bool)
--   
-- --
--   >>> :kind! Ana (Maybe Char)
--   Ana (Maybe Char) :: * 
--   = App (Typ (Maybe A0)) (Typ Char)
--   
-- --
--   >>> :kind! Ana (Either Int (Maybe Bool))
--   Ana (Either Int (Maybe Bool)) :: *
--   = App
--       (App (Typ (Either A0 A1)) (Typ Int))
--       (App (Typ (Maybe A0)) (Typ Bool))
--   
-- --
--   >>> :kind! Ana ([(Bool,())])
--   Ana ([(Bool,())]) :: * 
--   = App (Typ [A0]) (App (App (Typ (A0, A1)) (Typ Bool)) (Typ ()))
--   
type family Ana t instance Data.Model.Class.Model a => Data.Model.Class.AsType (Type.Analyse.Typ a) instance (GHC.TypeNats.KnownNat t, Data.Typeable.Internal.Typeable t) => Data.Model.Class.Model (Type.ANat.ANat t) instance (Data.Model.Class.AsType (Type.Analyse.Ana a), Data.Model.Class.Model a) => Data.Model.Class.GModel (GHC.Generics.K1 i a) instance Data.Model.Class.GModel (GHC.Generics.M1 GHC.Generics.D d GHC.Generics.V1) instance (Data.Model.Class.GModel a, GHC.Generics.Constructor c) => Data.Model.Class.GModel (GHC.Generics.M1 GHC.Generics.D d (GHC.Generics.M1 GHC.Generics.C c a)) instance (GHC.Generics.Datatype d, Data.Model.Class.GModel a, Data.Model.Class.GModel b) => Data.Model.Class.GModel (GHC.Generics.M1 GHC.Generics.D d (a GHC.Generics.:+: b)) instance (Data.Model.Class.GModel a, GHC.Generics.Constructor c) => Data.Model.Class.GModel (GHC.Generics.M1 GHC.Generics.C c a) instance (Data.Model.Class.GModel a, Data.Model.Class.GModel b) => Data.Model.Class.GModel (a GHC.Generics.:+: b) instance (GHC.Generics.Selector c, Data.Model.Class.GModel a) => Data.Model.Class.GModel (GHC.Generics.M1 GHC.Generics.S c a) instance (Data.Model.Class.GModel a, Data.Model.Class.GModel b) => Data.Model.Class.GModel (a GHC.Generics.:*: b) instance Data.Model.Class.GModel GHC.Generics.U1 instance (Data.Model.Class.AsType f, Data.Model.Class.AsType a) => Data.Model.Class.AsType (Type.Analyse.App f a) -- | Instances of Model for common types (Bool,Maybe,Either). module Data.Model.Instances instance Data.Model.Class.Model GHC.Types.Bool instance Data.Model.Class.Model a => Data.Model.Class.Model (GHC.Maybe.Maybe a) instance (Data.Model.Class.Model a, Data.Model.Class.Model b) => Data.Model.Class.Model (Data.Either.Either a b) module Data.Model