Safe Haskell | None |
---|
- deriveStackPrisms :: Name -> Q [Dec]
- deriveStackPrismsWith :: (String -> String) -> Name -> Q [Dec]
- deriveStackPrismsFor :: [String] -> Name -> Q [Dec]
Documentation
deriveStackPrisms :: Name -> Q [Dec]Source
Derive stack prisms for a given datatype.
For example:
deriveStackPrisms ''Maybe
will create
_Just :: StackPrism (a :- t) (Maybe a :- t) _Nothing :: StackPrism t (Nothing :- t)
together with their implementations.