-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtemplate-default.cabal
34 lines (32 loc) · 1.57 KB
/
template-default.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: template-default
version: 0.1.2
synopsis: declaring Default instances just got even easier
description: 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, for example:
.
> (-# LANGUAGE TemplateHaskell #-)
> import Data.Default.TH
> data List a = Nil | Cons a (List a)
> deriveDefault ''List
.
This example results in the following instance:
.
> instance Data.Default.Default (List a_ad2) where
> Data.Default.def = Nil
homepage: https://github.com/haskell-pkg-janitors/template-default
license: BSD3
license-file: LICENSE
author: Daniel Wagner
maintainer: Daniel Wagner <[email protected]>
copyright: Daniel Wagner 2012
category: Data
build-type: Simple
cabal-version: >=1.8
library
exposed-modules: Data.Default.TH
build-depends: base >= 3 && < 6, data-default, template-haskell >= 2.4 && < 2.11