| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Barbie.TH
Synopsis
- class FieldNamesB b where
- bfieldNames :: IsString a => b (Const a)
- declareBareB :: DecsQ -> DecsQ
Documentation
class FieldNamesB b where Source #
barbies doesn't care about field names, but they are useful in many use cases
declareBareB :: DecsQ -> DecsQ Source #
Transform a regular Haskell record declaration into HKD form.
BareB, FieldNamesB, FunctorB, TraversableB, ProductB,
ConstraintsB and ProductBC instances are derived.
For example,
declareBareB [d|data User = User { uid :: Int, name :: String}|]becomes
data User t f = User { uid :: Wear t f Int, name :: Wear t f String }