Copyright | (c) 2016-2019 Rudy Matela |
---|---|
License | 3-Clause BSD (see the file LICENSE) |
Maintainer | Rudy Matela <rudy@matela.com.br> |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- tyArity :: TypeRep -> Int
- unFunTy :: TypeRep -> (TypeRep, TypeRep)
- isFunTy :: TypeRep -> Bool
- argumentTy :: TypeRep -> TypeRep
- resultTy :: TypeRep -> TypeRep
- finalResultTy :: TypeRep -> TypeRep
- boolTy :: TypeRep
- intTy :: TypeRep
- orderingTy :: TypeRep
- mkComparisonTy :: TypeRep -> TypeRep
- mkCompareTy :: TypeRep -> TypeRep
- funTyCon :: TyCon
- compareTy :: TypeRep -> TypeRep -> Ordering
- elementTy :: TypeRep -> TypeRep
- (->::) :: TypeRep -> TypeRep -> TypeRep
- module Data.Typeable
Documentation
argumentTy :: TypeRep -> TypeRep Source #
finalResultTy :: TypeRep -> TypeRep Source #
orderingTy :: TypeRep Source #
mkComparisonTy :: TypeRep -> TypeRep Source #
mkCompareTy :: TypeRep -> TypeRep Source #
elementTy :: TypeRep -> TypeRep Source #
This function returns the type of the element of a list. It will throw an error when not given the list type.
> > elementTy $ typeOf (undefined :: [Int]) Int > > elementTy $ typeOf (undefined :: [[Int]]) [Int] > > elementTy $ typeOf (undefined :: [Bool]) Bool > > elementTy $ typeOf (undefined :: Bool) *** Exception: error (elementTy): `Bool' is not a list type
(->::) :: TypeRep -> TypeRep -> TypeRep infixr 9 Source #
An infix alias for mkFunTy
. It is right associative.
module Data.Typeable