[GHC] #10857: "ghci -XMonomorphismRestriction" doesn't turn on the monomorphism restriction
GHC
ghc-devs at haskell.org
Sun Sep 20 20:17:19 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):
Hey, I looked into this and it turns out it's actually not that easy to
move it to an earlier point because those options should be in the
interactive DynFlags which we set only after we have overwritten the
DynFlags using the command line arguments.
Now there is an easy solution which consists of just putting it in the
standard DynFlags instead of the interactive ones. In fact we already do
this for [https://github.com/ghc/ghc/blob/master/ghc/Main.hs#L182 another
flag]. This works just fine but obviously some tests fail now since it is
now not limited to the interactive flags.
The other option is to set all of the interactive DynFlags earlier, but it
looks like we then need to have two different set of flags, modify both of
them by the command line arguments and then set them. This does not seem
like a very nice solution either.
If you are okay with putting it not in the interactive dynflags, then
that's definitely the easiest solution, but as I am not really happy with
that myself I'll think about it a bit more and try to come up with a less
hacky solution.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10857#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list