-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Support functions to work with type representations. -- -- Support functions to work with type representations, as exported from -- Type.Reflection. Of particular interest is a facility to -- translate TypeReps into strings, with customizability around -- whether the rendered strings are fully qualified. @package type-reflection @version 1.0 -- | Provides utilities for manipulating a TypeRep of compile-time -- lists. module Type.Reflection.List -- | Turn a representation of a list into a list of representations. typeRepList :: forall {k} (xs :: [k]). TypeRep xs -> NP TypeRep xs -- | Given a representation of a list, get a representation of the kind of -- the list's elements. typeRepListKind :: TypeRep @[k] xs -> TypeRep k -- | This module provides three different ways of serializing a -- TypeRep into a Text: qualifying no names, qualifying all -- names, or package-qualifying all names. In order to support meaningful -- notions of equality on these string representations (for e.g. using -- them as keys in a map), newtypes are provided for each -- format. module Type.Reflection.Name -- | A rendering of a type where no components have module or package -- qualifications. Data constructors used in types are preceded with a -- ', and infix operator types are printed without parentheses. -- Uses defaultRenderTypeRep to render types; see that function -- for further details. newtype Unqualified MkUnqualified :: Text -> Unqualified -- | Extract the contents of an Unqualified rendering getUnqualified :: Unqualified -> Text -- | Convert a TypeRep into an Unqualified representation showUnqualified :: TypeRep t -> Unqualified -- | A rendering of a type where all components have module qualifications. -- Data constructors used in types are preceded first with their module -- qualification, and then with a ', and infix operator types -- are printed without parentheses. So we have Data.Proxy.'Proxy -- for the Proxy constructor. Uses defaultRenderTypeRep -- to render types; see that function for further details.j -- -- Note that module qualifications arise from the module that defines a -- type, even if this is a hidden or internal module. This fact means -- that internal-structure changes in your libraries may affect how your -- types are rendered, including changes in e.g. base. newtype Qualified MkQualified :: Text -> Qualified -- | Extract the contents of a Qualified rendering getQualified :: Qualified -> Text -- | Convert a TypeRep into a Qualified representation showQualified :: TypeRep t -> Qualified -- | A rendering of a type where all components have package and module -- qualifications Data constructors used in types are preceded first with -- their package qualification, and then their module qualification, and -- then with a ', and infix operator types are printed without -- parentheses. So we have base.Data.Proxy.'Proxy for the -- Proxy constructor. Uses defaultRenderTypeRep to render -- types; see that function for further details. -- -- Note that module qualifications arise from the module that defines a -- type, even if this is a hidden or internal module. This fact means -- that internal-structure changes in your libraries may affect how your -- types are rendered, including changes in e.g. base. newtype PackageQualified MkPackageQualified :: Text -> PackageQualified -- | Extract the contents of a PackageQualified name getPackageQualified :: PackageQualified -> Text -- | Convert a TypeRep into a PackageQualified representation showPackageQualified :: TypeRep t -> PackageQualified -- | The TypeText class describes how a TyCon is rendered -- into a textual representation, and it is used to render a -- TypeRep by renderTypeRep. The IsString superclass -- is needed to insert connectives like spaces, dots, and parentheses, -- and the Monoid superclass is needed to stitch these pieces -- together. -- -- Only renderTyCon is needed for instances; if -- renderTypeRep is omitted, then the default rendering, via -- defaultRenderTypeRep is used. See that function for more -- details. -- -- The only consistency law for TypeText is this, holding for all -- tr of type TypeRep : -- --
--   case tr of Con' tc [] -> renderTypeRep tr == renderTyCon tc
--              _ -> True
--   
-- -- In other words, rendering a TypeRep consisting only of a -- TyCon is the same as rendering the TyCon itself. If the -- TypeRep is not a plain TyCon (with no kind arguments), -- then there are no applicable laws. Note that the law uses ==, -- even though Eq is not a superclass of TypeText. class (IsString tt, Monoid tt, Ord tt) => TypeText tt renderTyCon :: TypeText tt => TyCon -> tt renderTypeRep :: TypeText tt => TypeRep t -> tt -- | Render a TypeRep into an instance of TypeText. This -- follows the following rules for how to render a type: -- -- defaultRenderTypeRep :: forall tn outer_t. TypeText tn => TypeRep outer_t -> tn instance Data.String.IsString Type.Reflection.Name.Unqualified instance GHC.Base.Monoid Type.Reflection.Name.Unqualified instance GHC.Base.Semigroup Type.Reflection.Name.Unqualified instance Data.Hashable.Class.Hashable Type.Reflection.Name.Unqualified instance GHC.Show.Show Type.Reflection.Name.Unqualified instance GHC.Classes.Ord Type.Reflection.Name.Unqualified instance GHC.Classes.Eq Type.Reflection.Name.Unqualified instance Data.String.IsString Type.Reflection.Name.Qualified instance GHC.Base.Monoid Type.Reflection.Name.Qualified instance GHC.Base.Semigroup Type.Reflection.Name.Qualified instance Data.Hashable.Class.Hashable Type.Reflection.Name.Qualified instance GHC.Show.Show Type.Reflection.Name.Qualified instance GHC.Classes.Ord Type.Reflection.Name.Qualified instance GHC.Classes.Eq Type.Reflection.Name.Qualified instance Data.String.IsString Type.Reflection.Name.PackageQualified instance GHC.Base.Monoid Type.Reflection.Name.PackageQualified instance GHC.Base.Semigroup Type.Reflection.Name.PackageQualified instance Data.Hashable.Class.Hashable Type.Reflection.Name.PackageQualified instance GHC.Show.Show Type.Reflection.Name.PackageQualified instance GHC.Classes.Ord Type.Reflection.Name.PackageQualified instance GHC.Classes.Eq Type.Reflection.Name.PackageQualified instance Type.Reflection.Name.TypeText Type.Reflection.Name.PackageQualified instance Type.Reflection.Name.TypeText Type.Reflection.Name.Qualified instance Type.Reflection.Name.TypeText Type.Reflection.Name.Unqualified