Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Make declaring Default instances for your Haskell data types even easier

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 Data
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Setup.hs
Octocat-spinner-32 template-default.cabal
README.md

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
Something went wrong with that request. Please try again.