#3217: Make GHCi have separate flags for interactive Haskell expressions
---------------------------------+------------------------------------------
Reporter: simonpj | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 6.12 branch
Component: Compiler | Version: 6.10.2
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Comment (by claus):
1. Ok. In batch mode, in-source flags/options apply to the current module
only, not to imports or importers, while commandline flags/options apply
transitively to the whole session.
In GHCi, there is currently no equivalent to the former, only to the
latter.
Your "interactive flags" that apply to the current session prompt only,
not to code loaded during the session, would be the equivalent to GHCi
prompt pragmas, just that you are suggesting a different syntax/interface.
I agree that offering both prompt and session flags would be more
consistent. I'm still slightly concerned about the interface, which could
easily become more confusing rather than simpler.
2. This was beginning to sound more and more like deja vu (does that even
apply to sounds?-), and indeed: "Change the meaning of -fextended-default-
rules" #1877
3. In current GHC head, what baked-in rules are not switched off by `:set
-XNoExtendedDefaults`?
4. While you're dealing with this, could you please remove the current
inconsistency that in-source flags are not propagated to the interactive
flags? Given module
{{{
{-# LANGUAGE PatternGuards #-}
f x | () <- x = x
}}}
I would expect to have `PatternGuards` available when GHCi is in `*Main`
(as opposed to `Main`), but that isn't the case:
{{{
Ok, modules loaded: Main.
*Main> let g x | () <- x = x
<interactive>:1:8:
Warning: accepting non-standard pattern guards (use -XPatternGuards to
suppress this message)
() <- x
}}}
and having to repeat all those pragma flags in the GHCi session is
somewhat tedious.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3217#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs