| Copyright | 2017 Kei Hibino |
|---|---|
| License | BSD3 |
| Maintainer | ex8k.hibino@gmail.com |
| Stability | experimental |
| Portability | unknown |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Functor.ProductIsomorphic.TH
Description
This module exports templates to make product constructors.
Synopsis
- defineProductConstructor :: Name -> Q [Dec]
- defineTupleProductConstructor :: Int -> Q [Dec]
- reifyRecordType :: Name -> Q (((TypeQ, [Name]), ExpQ), (Maybe [Name], [TypeQ]))
Template of ProductConstructor
defineProductConstructor Source #
Arguments
| :: Name | name of product or record type constructor |
| -> Q [Dec] | result template |
Make template of ProductConstructor instance from type constructor name.
defineTupleProductConstructor Source #
Arguments
| :: Int | n-tuple |
| -> Q [Dec] | result template |
Make template of ProductConstructor instance of tuple type.
Low-level API to get record info
reifyRecordType :: Name -> Q (((TypeQ, [Name]), ExpQ), (Maybe [Name], [TypeQ])) Source #
Low-level reify interface for record type name.