Skip to content

Make -XNoMonoPatBinds documentation match ghc behavior

According to this documentation: http://www.haskell.org/ghc/docs/7.4.1/html/users_guide/monomorphism.html

And this ticket: http://hackage.haskell.org/trac/ghc/ticket/4940

I would expect for ghc-7.4.1 to give an error about this example:

foo :: a -> a
bar :: a -> a
(foo, bar) = (\x -> x, \y -> y)

main = print $ foo $ bar 1

Trying this code on ghc 7.0.1 gives the error listed in #4940 (closed) but on ghc-7.4.1 this code type checks and using -XNoMonoPatBinds gives this warning:

on the commandline:
    Warning: -XMonoPatBinds is deprecated: Experimental feature now removed; has no effect

I suspect the bug is with the documentation and the section about mono pat binds is in the user guide of the latest release of GHC.

Trac metadata
Trac field Value
Version 7.6.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Documentation
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information