-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Utilities for polytypeable. -- -- Utilities for polytypeable (Typeable for polymorphic types). @package polytypeable-utils @version 0.1.0.0 -- | Usage: -- --
-- > polyTypeOf id -- a1 -> a1 ---- --
-- > freeTyVars (polyTypeOf id) -- ["a1"] ---- --
-- > substTyVar ("a1",polyTypeOf(undefined::Int)) (polyTypeOf id)
-- Int -> Int
--
--
-- -- > polyTypeOf const -- a1 -> a2 -> a1 ---- --
-- > freeTyVars (polyTypeOf const) -- ["a1","a2"] ---- --
-- > substManyTyVars [("a1",polyTypeOf(undefined::Int)),("a2",polyTypeOf(undefined::Bool))] (polyTypeOf const)
-- Int -> Bool -> Int
--
module Data.PolyTypeable.Utils
-- | collect free type variables (e.g. a1, a2, ...) without duplicates
freeTyVars :: TypeRep -> [String]
-- | substitue a type variable
substTyVar :: (String, TypeRep) -> TypeRep -> TypeRep
-- | substitue many type variables
substTyVars :: [(String, TypeRep)] -> TypeRep -> TypeRep