| Copyright | (c) Sirui Lu 2024 |
|---|---|
| License | BSD-3-Clause (see the LICENSE file) |
| Maintainer | siruilu@cs.washington.edu |
| Stability | Experimental |
| Portability | GHC only |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Grisette.Internal.TH.UnifiedConstructor
Description
Synopsis
- mkUnifiedConstructor :: String -> Name -> Q [Dec]
- mkUnifiedConstructor' :: [String] -> Name -> Q [Dec]
Documentation
Arguments
| :: String | Prefix for generated wrappers |
| -> Name | The type to generate the wrappers for |
| -> Q [Dec] |
Generate smart constructors to create unified values.
For a type T mode a b c with constructors T1, T2, etc., this function
will generate smart constructors with the given prefix, e.g., mkT1, mkT2,
etc.
The generated smart constructors will contruct values of type
GetData mode (T mode a b c).
mkUnifiedConstructor' Source #
Arguments
| :: [String] | Names for generated wrappers |
| -> Name | The type to generate the wrappers for |
| -> Q [Dec] |
Generate smart constructors to create unified values.
For a type T mode a b c with constructors T1, T2, etc., this function
will generate smart constructors with the given names.
The generated smart constructors will contruct values of type
GetData mode (T mode a b c).