Imported from ekmett/guanxi (
AGENTS.md). Install upstream withnpx skills add ekmett/guanxi. Copyright stays with the author.
AGENTS
Hiding (fail) policy
When importing modules that used to re-export fail (via Control.Monad or Prelude),
use CPP guards to keep hiding (fail) only for versions that still export it.
base < 4.13:Prelude/Control.Monadexportfail; usehiding (fail).mtl < 2.3.1:Control.Monad.ContandControl.Monad.State.Strictre-exportControl.Monad(and thusfail); usehiding (fail).base < 4.13: importControl.Monad.Fail (MonadFail)only when needed; forbase >= 4.13it is inPrelude, so the import becomes redundant.
Rationale: newer GHC/base and mtl drop these re-exports, and unguarded hiding (fail)
triggers warnings. The guards keep older toolchains clean without penalizing modern ones.
