registry-0.1.2.6: data structure for assembling components

Safe HaskellNone
LanguageHaskell2010

Data.Registry.Internal.Reflection

Description

Utility functions to display or manipulate types

Synopsis

Documentation

isFunction :: SomeTypeRep -> Bool Source #

Return true if the type of this type rep represents a function

showFullValueType :: Typeable a => a -> Text Source #

Show the full type of a typeable value

showFullFunctionType :: Typeable a => a -> ([Text], Text) Source #

Show the full type of a typeable function

showTheFullValueType :: forall (r1 :: RuntimeRep) (arg :: TYPE r1). TypeRep arg -> Text Source #

Show the full type of a typeable value where nested types like IO[Int] or functions are represented and non GHC types are shown with their module names

showTheFullFunctionType :: forall (r1 :: RuntimeRep) (arg :: TYPE r1). TypeRep arg -> ([Text], Text) Source #

Show the full type of a typeable value where nested types like IO[Int] or functions are represented and non GHC types are shown with their module names

showNested :: SomeTypeRep -> SomeTypeRep -> Text Source #

Show a type like m a

showSingleType :: SomeTypeRep -> Text Source #

Show a single type. Don't display the module for GHC types

mustShowModuleName :: Text -> Bool Source #

Return true if the module name can be shown

tweakNested :: Text -> Text Source #

Tweak some standard module names for better display

parenthesizeNested :: Text -> Text Source #

This is an attempt to better render "nested" types like IO (Maybe Text) The input value is "IO Maybe Text" and the output text will be "IO (Maybe Text)" This will unfortunately not work with types having several type parameters like IO (Either Text Int)

showWithModuleName :: SomeTypeRep -> Text Source #

Show a type with its module name