Skip to content
  • Simon Marlow's avatar
    [project @ 2005-03-18 13:37:27 by simonmar] · d1c1b7d0
    Simon Marlow authored
    Flags cleanup.
    
    Basically the purpose of this commit is to move more of the compiler's
    global state into DynFlags, which is moving in the direction we need
    to go for the GHC API which can have multiple active sessions
    supported by a single GHC instance.
    
    Before:
    
    $ grep 'global_var' */*hs | wc -l
         78
    
    After:
    
    $ grep 'global_var' */*hs | wc -l
         27
    
    Well, it's an improvement.  Most of what's left won't really affect
    our ability to host multiple sessions.
    
    Lots of static flags have become dynamic flags (yay!).  Notably lots
    of flags that we used to think of as "driver" flags, like -I and -L,
    are now dynamic.  The most notable static flags left behind are the
    "way" flags, eg. -prof.  It would be nice to fix this, but it isn't
    urgent.
    
    On the way, lots of cleanup has happened.  Everything related to
    static and dynamic flags lives in StaticFlags and DynFlags
    respectively, and they share a common command-line parser library in
    CmdLineParser.  The flags related to modes (--makde, --interactive
    etc.) are now private to the front end: in fact private to Main
    itself, for now.
    d1c1b7d0