[GHC] #10857: "ghci -XMonomorphismRestriction" doesn't turn on the monomorphism restriction

GHC ghc-devs at haskell.org
Mon Sep 21 16:52:21 UTC 2015


#10857: "ghci -XMonomorphismRestriction" doesn't turn on the monomorphism
restriction
-------------------------------------+-------------------------------------
        Reporter:  rwbarton          |                   Owner:  cocreature
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  GHCi              |                 Version:  7.10.1
      Resolution:                    |                Keywords:  newcomer
Operating System:  Unknown/Multiple  |            Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:  #3202, #3217      |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by cocreature):

 The tests that fail are
 {{{
 make TEST="dynbrk002 break021 break012 print012 break020 ghci057 T9293
 ghci024 ghci058"
 }}}
 and here's the [http://lpaste.net/141427 output]. One reason for the
 failure is that :show language shows the extensions whereas atm only
 :showi language shows them. The other failures seem to be related to the
 ghci debugger printing some type signatures differently which is probably
 related to {{{-XExtendedDefaultRules and}}}
 {{{-XNoMonomorphismRestriction}}} now appearing outside of the interactive
 session flags as well. Apart from the debugger case I feel like it's
 mostly a semantic distinction.

 Your code doesn't fail because the hack only adds {{{-fimplicit-import-
 qualified}}} to the DynFlags if load mode is {{{DoInteractive}}} or
 {{{DoEval}}}. I haven't managed to come up with anything that triggers the
 bug.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10857#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list