summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T2494.stderr
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-11-24 12:46:33 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2015-11-24 12:47:39 +0100
commitf09f2470a76bb08b7f51d2f5663daa672b86f618 (patch)
treec1caef650e832d4f868ba6260ca4a452dccbc353 /testsuite/tests/typecheck/should_compile/T2494.stderr
parent12dbc89228d9a13c011e4f399db1bdc0fa4681f0 (diff)
downloadhaskell-f09f2470a76bb08b7f51d2f5663daa672b86f618.tar.gz
Implement new `-fwarn-noncanonical-monad-instances`
Warn about incoherent/non-canonical 'Applicative'/'Monad' instance declarations. Specifically the following invariants are checked: In 'Monad' instances declarations warn if the any of the following conditions does not hold: * If `return` is overridden it must be canonical (i.e. `return = pure`). * If `(>>)` is overridden it must be canonical (i.e. `(>>) = (*>)`). In 'Applicative' instance declarations: * Warn if 'pure' is defined backwards (i.e. `pure = return`). * Warn if '(*>)' is defined backwards (i.e. `(*>) = (>>)`). NB, this warning flag is not enabled via `-Wall` nor `-Wcompat`. This addresses #11128 Reviewers: quchen, austin, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1516
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T2494.stderr')
0 files changed, 0 insertions, 0 deletions