peakachu-0.2: Experiemental library for composable interactive programsSource codeContentsIndex
Data.Newtype
Description

In/with newtype functions generation with Template Haskell.

Example:

 {-# LANGUAGE TemplateHaskell #-}
 import Control.Applicative (Applicative(..), ZipList(..))
 import Data.Newtype (mkWithNewTypeFuncs)

 $(mkWithNewtypeFuncs [2] ''ZipList)

 > withZipList2 (<*>) [(+3), (*3)] [6, 7]
 [9, 21]
Documentation
mkInNewtypeFuncs :: [Int] -> Name -> Q [Dec]Source
mkWithNewtypeFuncs :: [Int] -> Name -> Q [Dec]Source
Produced by Haddock version 2.4.2