| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
IfSat.Plugin
Documentation
A type-checking plugin that solves ct_l || ct_r constraints.
This allows users to branch on whether ct_l is satisfied.
To use this plugin, add {-# OPTIONS_GHC -fplugin=IfSat.Plugin #-}
to your module header.
A ct_l || ct_r instance is solved by trying to solve ct_l:
- if solving succeeds, the
dispatchfunction will pick the first branch, - otherwise,
dispatchwill pick the second branch.
This means that the branch selection occurs precisely at the moment
at which we solve the ct_l || ct_r constraint.
See the documentation of dispatch for more information.