The typeable-th package

[Tags:bsd3, library, test]

This package provides template haskell functions for deriving TypeableN instances for types of every kind, selecting the best N that is possible.

[Skip to Readme]


Versions 0.1, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5
Dependencies base (==4.*), template-haskell (>= && <, transformers [details]
License BSD3
Copyright Copyright (C) 2013 Benno Fünfstück
Author Benno Fünfstück
Stability Unknown
Category Data
Home page
Bug tracker
Source repository head: git clone git://
Uploaded Tue Oct 21 13:52:59 UTC 2014 by BennoFuenfstueck
Distributions NixOS:0.1.5
Downloads 1200 total (4 in the last 30 days)
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for typeable-th

Readme for typeable-th-0.1.5

typeable-th Build Status

There is no need to manually write TypeableN instances anymore, even for complex data types! This package derives typeable instances automatically. To use it, you just have to enable a few extensions and import the package:

{-# LANGUAGE EmptyDataDecls       #-}
{-# LANGUAGE FlexibleContexts     #-}
{-# LANGUAGE KindSignatures       #-}
{-# LANGUAGE ScopedTypeVariables  #-}
{-# LANGUAGE TemplateHaskell      #-}
{-# LANGUAGE UndecidableInstances #-}

import Data.Typeable.TH

And then define your data type and call makeTypeable ''YourDataTypeName:

data Weird a (b :: * -> *) c d = Weird

makeTypeable ''Weird

And that's it!


Contributions and bug reports are welcome! Just fork and then sumbit a pull request if you want to implement some feature, or open a bug report to discuss the feature or bug.