The typeable-th package

[ Tags: bsd3, data, library ] [ Propose Tags ]

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
Category Data
Home page
Bug tracker
Source repo head: git clone git://
Uploaded Tue Oct 21 13:52:59 UTC 2014 by BennoFuenfstueck
Distributions NixOS:0.1.5
Downloads 1952 total (29 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for typeable-th-0.1.5

[back to package description]

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.