thorn-0.2: Datatype Manipulation with Template Haskell

Safe HaskellNone

Data.Thorn.Basic

Contents

Description

The module Data.Thorn.Basic.

Synopsis

Type Variants

These types T0, ..., T9 are used for representing type variants.

 testtypevariant :: (String,Int,Int)
 testtypevariant = $(autofmap $[t|(,,) T0|]) (+10) (+20) ("hello",1,1) -- ("hello",11,21)

data T0 Source

data T1 Source

data T2 Source

data T3 Source

data T4 Source

data T5 Source

data T6 Source

data T7 Source

data T8 Source

data T9 Source

Names

modifyname :: (String, String) -> (String, String) -> String -> StringSource

 modifyname ("Prefix","Suffix") ("***","+++") "Hello" == "PrefixHelloSuffix"
 modifyname ("Prefix","Suffix") ("***","+++") ":%%%" == ":***%%%+++"
 modifyname ("prefix","suffix") ("***","+++") "hello" == "prefixhellosuffix"
 modifyname ("prefix","suffix") ("***","+++") "%%%" == "***%%%+++"