extensible-0.8: Extensible, efficient, optics-friendly data types and effects

Copyright(c) Fumiaki Kinoshita 2018
LicenseBSD3
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Extensible.TH

Description

 
Synopsis

Documentation

mkField :: String -> DecsQ Source #

Generate fields using itemAssoc. mkField "foo Bar" defines:

foo :: FieldOptic "foo"
foo = itemAssoc (Proxy :: Proxy "foo")
_Bar :: FieldOptic Bar
_Bar = itemAssoc (Proxy :: Proxy Bar)

mkFieldAs :: Name -> String -> DecsQ Source #

mkFieldAs (mkName "foo") "bar" defines a field for "bar" as foo.