Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#7508 closed bug (fixed)

Make -XNoMonoPatBinds documentation match ghc behavior

Reported by: dagit Owned by:
Priority: normal Milestone:
Component: Documentation Version: 7.6.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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 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.

Change History (2)

comment:1 Changed 3 years ago by simonpj

  • difficulty set to Unknown
  • Resolution set to fixed
  • Status changed from new to closed

You're right... even the HEAD documentation mentions MonoPatBinds which indeed has gone. I've tidied up the documentation HEAD, but won't go back to earlier releases. Thanks for pointing this out.

comment:2 Changed 3 years ago by dagit

Thank you!

Note: See TracTickets for help on using tickets.