typeable-th: Automatic deriving of TypeableN instances with Template Haskell

[ bsd3, data, library ] [ Propose Tags ] [ Report a vulnerability ]

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]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5
Dependencies base (>=4 && <5), template-haskell (>=2.7.0.0 && <2.9.0.0), transformers [details]
License BSD-3-Clause
Copyright Copyright (C) 2013 Benno Fünfstück
Author Benno Fünfstück
Maintainer benno.fuenfstueck@gmail.com
Category Data
Home page http://github.com/bennofs/typeable-th
Bug tracker http://github.com/bennofs/typeable-th/issues
Source repo head: git clone git://github.com/bennofs/typeable-th
Uploaded by BennoFuenfstueck at 2014-10-21T13:52:59Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 4393 total (1 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

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

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.