template-default: declaring Default instances just got even easier
Declaring instances of the Default type class has always
been pretty mechanical. This package makes the compiler do
the mechanical bit. This has the benefit that even less
thought is required, and the instance will automatically
be corrected when the definition of the data type changes
(say, to add more arguments to the constructor). Usage
looks like this:
(-# LANGUAGE TemplateHaskell #-) import Data.Default.TH deriveDefault ''MyFancyTypeName
Downloads
- template-default-0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1, 0.1.1, 0.1.2 |
|---|---|
| Dependencies | base (>=3 && <6), data-default, template-haskell (>=2.4 && <2.8) [details] |
| License | BSD-3-Clause |
| Copyright | Daniel Wagner 2012 |
| Author | Daniel Wagner |
| Maintainer | Daniel Wagner <daniel@wagner-home.com> |
| Uploaded | by DanielWagner at 2012-04-28T04:14:48Z |
| Category | Data |
| Home page | https://github.com/haskell-pkg-janitors/template-default |
| Distributions | |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Downloads | 2336 total (7 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] |