| Portability | see LANGUAGE pragmas (... GHC) |
|---|---|
| Stability | experimental |
| Maintainer | nicolas.frisby@gmail.com |
| Safe Haskell | None |
Data.Yoko.SmartPreciseCase
Description
Using some McBride "Faking It" style trickery to make precise_case
polyvariadic in the ad-hoc cases.
E.g.
precise_case x (\(C_ a b) -> special_case a b) (Default $ \x -> generic_function x)
and
precise_case x (\(C_ a b) -> special_case a b) (\(D_ x) -> special_case2 x) (Default $ \x -> generic_function x)
both work.
Documentation
precise_case0 :: Builder (Start dt) bldr => dt -> bldrSource