1. 11 Oct, 2006 2 commits
    • Simon Marlow's avatar
      Module header tidyup, phase 1 · 49c98d14
      Simon Marlow authored
      This patch is a start on removing import lists and generally tidying
      up the top of each module.  In addition to removing import lists:
      
         - Change DATA.IOREF -> Data.IORef etc.
         - Change List -> Data.List etc.
         - Remove $Id$
         - Update copyrights
         - Re-order imports to put non-GHC imports last
         - Remove some unused and duplicate imports
      49c98d14
    • Simon Marlow's avatar
      Interface file optimisation and removal of nameParent · b00b5bc0
      Simon Marlow authored
      This large commit combines several interrelated changes:
      
        - IfaceSyn now contains actual Names rather than the special
          IfaceExtName type.  The binary interface file contains
          a symbol table of Names, where each entry is a (package,
          ModuleName, OccName) triple.  Names in the IfaceSyn point
          to entries in the symbol table.
      
          This reduces the size of interface files, which should
          hopefully improve performance (not measured yet).
      
          The toIfaceXXX functions now do not need to pass around
          a function from Name -> IfaceExtName, which makes that
          code simpler.
      
        - Names now do not point directly to their parents, and the
          nameParent operation has gone away.  It turned out to be hard to
          keep this information consistent in practice, and the parent info
          was only valid in some Names.  Instead we made the following
          changes:
      
          * ImportAvails contains a new field 
                imp_parent :: NameEnv AvailInfo
            which gives the family info for any Name in scope, and
            is used by the renamer when renaming export lists, amongst
            other things.  This info is thrown away after renaming.
      
          * The mi_ver_fn field of ModIface now maps to
            (OccName,Version) instead of just Version, where the
            OccName is the parent name.  This mapping is used when
            constructing the usage info for dependent modules.
            There may be entries in mi_ver_fn for things that are not in
            scope, whereas imp_parent only deals with in-scope things.
      
          * The md_exports field of ModDetails now contains
            [AvailInfo] rather than NameSet.  This gives us
            family info for the exported names of a module.
      
      Also:
      
         - ifaceDeclSubBinders moved to IfaceSyn (seems like the
           right place for it).
      
         - heavily refactored renaming of import/export lists.
      
         - Unfortunately external core is now broken, as it relied on
           IfaceSyn.  It requires some attention.
      b00b5bc0
  2. 10 Oct, 2006 9 commits
  3. 09 Oct, 2006 2 commits
  4. 07 Oct, 2006 1 commit
  5. 04 Oct, 2006 1 commit
  6. 06 Oct, 2006 12 commits
  7. 05 Oct, 2006 1 commit
  8. 29 Sep, 2006 1 commit
  9. 05 Oct, 2006 2 commits
  10. 03 Oct, 2006 6 commits
  11. 05 Oct, 2006 3 commits
    • Ian Lynagh's avatar
      More bootstrapping updates · 843a9457
      Ian Lynagh authored
      843a9457
    • simonpj@microsoft.com's avatar
      Teach SpecConstr about Cast · 0da2eb6b
      simonpj@microsoft.com authored
      This patch teaches SpecConstr about casts; see Note [SpecConstr for casts]
      0da2eb6b
    • simonpj@microsoft.com's avatar
      Float coercions out of lets · b041525c
      simonpj@microsoft.com authored
      Note [Float coercions]
      ~~~~~~~~~~~~~~~~~~~~~~
      When we find the binding
      	x = e `cast` co
      we'd like to transform it to
      	x' = e
      	x = x `cast` co		-- A trivial binding
      There's a chance that e will be a constructor application or function, or something
      like that, so moving the coerion to the usage site may well cancel the coersions
      and lead to further optimisation.  Example:
      
           data family T a :: *
           data instance T Int = T Int
      
           foo :: Int -> Int -> Int
           foo m n = ...
              where
                x = T m
                go 0 = 0
                go n = case x of { T m -> go (n-m) }
      		-- This case should optimise
      
      b041525c