1. 04 Jun, 2008 1 commit
  2. 02 Jun, 2008 1 commit
  3. 28 May, 2008 1 commit
    • Simon Marlow's avatar
      Use MD5 checksums for recompilation checking (fixes #1372, #1959) · 526c3af1
      Simon Marlow authored
      This is a much more robust way to do recompilation checking.  The idea
      is to create a fingerprint of the ABI of an interface, and track
      dependencies by recording the fingerprints of ABIs that a module
      depends on.  If any of those ABIs have changed, then we need to
      recompile.
      
      In bug #1372 we weren't recording dependencies on package modules,
      this patch fixes that by recording fingerprints of package modules
      that we depend on.  Within a package there is still fine-grained
      recompilation avoidance as before.
      
      We currently use MD5 for fingerprints, being a good compromise between
      efficiency and security.  We're not worried about attackers, but we
      are worried about accidental collisions.
      
      All the MD5 sums do make interface files a bit bigger, but compile
      times on the whole are about the same as before.  Recompilation
      avoidance should be a bit more accurate than in 6.8.2 due to fixing
      #1959, especially when using -O.
      526c3af1
  4. 12 Apr, 2008 1 commit
  5. 10 Apr, 2008 1 commit
  6. 04 Apr, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Fix Trac #2188: scoping in TH declarations quotes · a27c5f77
      simonpj@microsoft.com authored
      This patch fixes a rather tiresome issue, namely the fact that
      a TH declaration quote *shadows* bindings in outer scopes:
      
        f g = [d| f :: Int
                  f = g
        	    g :: Int
                  g = 4 |]
      
      Here, the outer bindings for 'f' (top-level) and 'g' (local)
      are shadowed, and the inner bindings for f,g should not be
      reported as duplicates.  (Remember they are top-level bindings.)
      
      The actual bug was that we'd forgotten to delete 'g' from the
      LocalRdrEnv, so the type sig for 'g' was binding to the outer
      'g' not the inner one.
      a27c5f77
  7. 03 Apr, 2008 1 commit
  8. 29 Feb, 2008 1 commit
  9. 28 Feb, 2008 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      Remove GADT refinements, part 1 · 4226903d
      chak@cse.unsw.edu.au. authored
      - A while ago, I changed the type checker to use equality constraints together
        with implication constraints to track local type refinement due to GADT
        pattern matching.  This patch is the first of a number of surgical strikes
        to remove the resulting dead code of the previous GADT refinement machinery.
      
        Hurray to code simplification!
      4226903d
  10. 07 Feb, 2008 1 commit
    • Ian Lynagh's avatar
      Convert more UniqFM's back to LazyUniqFM's · d51f42f6
      Ian Lynagh authored
      These fix these failures:
         break008(ghci)
         break009(ghci)
         break026(ghci)
         ghci.prog009(ghci)
         ghci025(ghci)
         print007(ghci)
         prog001(ghci)
         prog002(ghci)
         prog003(ghci)
      at least some of which have this symptom:
          Exception: expectJust prune
      d51f42f6
  11. 17 Jan, 2008 1 commit
  12. 21 Nov, 2007 1 commit
    • simonpj@microsoft.com's avatar
      Make rebindable do-notation behave as advertised · 1d1c3c72
      simonpj@microsoft.com authored
      Adopt Trac #1537.  The patch ended up a bit bigger than I expected,
      so I suggest we do not merge this into the 6.8 branch.  But there
      is no funadamental reason why not.
      
      With this patch, rebindable do-notation really does type as if you
      had written the original (>>) and (>>=) operations in desguared form.
      
      I ended up refactoring some of the (rather complicated) error-context
      stuff in TcUnify, by pushing an InstOrigin into tcSubExp and its
      various calls. That means we could get rid of tcFunResTy, and the
      SubCtxt type.  This should improve error messages slightly
      in complicated situations, because we have an Origin to hand
      to instCall (in the (isSigmaTy actual_ty) case of tc_sub1).
      
      Thanks to Pepe for the first draft of the patch.
      1d1c3c72
  13. 06 Nov, 2007 2 commits
    • simonpj@microsoft.com's avatar
      Fix Trac #1814 (staging interaction in Template Haskell and GHCi), and add comments · 3f1b316d
      simonpj@microsoft.com authored
      An Id bound by GHCi from a previous Stmt is Global but Internal, and
      I'd forgotten that, leading to unnecessary restrictions when using TH
      and GHCi together.
      
      This patch fixes the problem and adds lots of explanatory comments (which
      is where most of the extra lines come from).
      
      3f1b316d
    • Simon Marlow's avatar
      GHC API: add checkAndLoadModule · 7379e82a
      Simon Marlow authored
      Does what the name suggests: it performs the function of both
      checkModule and load on that module, avoiding the need to process each
      module twice when checking a batch of modules.  This will make Haddock
      and ghctags much faster.
      
      Along with this is the beginnings of a refactoring of the HscMain
      interface.  HscMain now exports functions for separately running the
      parser, typechecher, and generating ModIface and ModDetails.
      Eventually the plan is to complete this interface and use it to
      replace the existing one.
      7379e82a
  14. 02 Nov, 2007 1 commit
    • simonpj@microsoft.com's avatar
      Refactor error recovery slightly · b9a98f56
      simonpj@microsoft.com authored
      Mostly this patch is refacoring, but it also avoids post-tc zonking if
      the typechecker found errors.  This is good because otherwise with
      DEBUG you can get the "Inventing strangely-kinded TyCon" warning.
      b9a98f56
  15. 01 Nov, 2007 1 commit
    • David Waern's avatar
      Refactor Haddock options · 03d8585e
      David Waern authored
      This patch renames the DOC_OPTIONS pragma to OPTIONS_HADDOCK. It also
      adds "-- # ..."-style Haddock option pragmas, for compatibility with
      code that use them.
      
      Another change is that both of these two pragmas behave like
      OPTIONS_GHC, i.e. they are only allowed at the top of the module, they
      are ignored everywhere else and they are stored in the dynflags. There is
      no longer any Haddock options in HsSyn.
      
      Please merge this to the 6.8.2 branch when 6.8.1 is out, if appropriate.
      03d8585e
  16. 10 Oct, 2007 1 commit
    • Dan Licata's avatar
      View patterns, record wildcards, and record puns · 6a05ec5e
      Dan Licata authored
      This patch implements three new features:
      * view patterns (syntax: expression -> pat in a pattern)
      * working versions of record wildcards and record puns
      See the manual for detailed descriptions.
      
      Other minor observable changes:
      * There is a check prohibiting local fixity declarations
        when the variable being fixed is not defined in the same let
      * The warn-unused-binds option now reports warnings for do and mdo stmts
      
      Implementation notes: 
      
      * The pattern renamer is now in its own module, RnPat, and the
      implementation is now in a CPS style so that the correct context is
      delivered to pattern expressions.
      
      * These features required a fairly major upheaval to the renamer.
      Whereas the old version used to collect up all the bindings from a let
      (or top-level, or recursive do statement, ...) and put them into scope
      before renaming anything, the new version does the collection as it
      renames.  This allows us to do the right thing with record wildcard
      patterns (which need to be expanded to see what names should be
      collected), and it allows us to implement the desired semantics for view
      patterns in lets.  This change had a bunch of domino effects brought on
      by fiddling with the top-level renaming.
      
      * Prior to this patch, there was a tricky bug in mkRecordSelId in HEAD,
      which did not maintain the invariant necessary for loadDecl.  See note
      [Tricky iface loop] for details.
      6a05ec5e
  17. 05 Sep, 2007 1 commit
  18. 04 Sep, 2007 1 commit
  19. 03 Sep, 2007 1 commit
  20. 01 Sep, 2007 1 commit
  21. 30 Aug, 2007 1 commit
  22. 26 Aug, 2007 1 commit
  23. 04 Aug, 2007 1 commit
  24. 02 Aug, 2007 1 commit
  25. 17 Jul, 2007 1 commit
    • andy@galois.com's avatar
      Adding pushing of hpc translation status through hi files. · c1681a73
      andy@galois.com authored
      Now, if a single module *anywhere* on the module tree is built with
      -fhpc, the binary will enable reading/writing of <bin>.tix.
      
      Previously, you needed to compile Main to allow coverage to operate.
      
      This changes the file format for .hi files; you will need to recompile every library.
      c1681a73
  26. 12 Jul, 2007 1 commit
    • mnislaih's avatar
      Teach :print to not panic when the DataCon for a closure is not exposed by the .hi file · 876db7ed
      mnislaih authored
      Previously the behaviour was to panic.
      Now it will print an approximated representation, 
      using the names (enclosed in keys, i.e. "<...>") 
      and the pointed subterms. Non pointed subterms cannot 
      be included in this representation:
      
      Prelude> let se = Data.Sequence.fromList (map Just "abc")
      Prelude> :eval se
      ()
      Prelude> :p se
      se = <Data.Sequence.Deep> (<Data.Sequence.One> (_t1::t)) () (<Data.Sequence.Two> (_t2::t) (_t3::t))
      Prelude> :eval _t2
      ()
      Prelude> :p se
      se = <Data.Sequence.Deep> (<Data.Sequence.One> (_t4::t1)) () (<Data.Sequence.Two> (Just 'b') (_t5::t1))
      Prelude>
      
      This patch also includes some fixes in the pretty printer 
      for the Term datatype
      
      876db7ed
  27. 13 Jul, 2007 1 commit
  28. 10 Jul, 2007 1 commit
  29. 23 May, 2007 1 commit
    • simonpj@microsoft.com's avatar
      In GHCi, bind identifiers at TH level 'impLevel' · 800dba35
      simonpj@microsoft.com authored
      Consder Trac #1265, which does this in GHCi:
      
      	Prelude> let doit = fail "Code not written yet" :: ExpQ
      	Prelude> $(doit)
      
      Even though 'doit' is defined "in the same module", it's OK to use it in a splice
      because it'll have been fully compiled to bytecode.  (Contrast the situation if
      these two lines appeared in a single, compiled module.)
      
      Hence we want to bind 'doit' at TH's "imported level" (TcRnTypes.impLevel).  
      This used to happen because GHCi-bound Ids were in the *global* type
      env (and hence at "imported level").  But since SimonM moved
      GHCi-bound ids to the *local* type env (for good reasons) the above
      program has been rejected.
      
      This patch makes it work again.
      800dba35
  30. 14 May, 2007 1 commit
  31. 11 May, 2007 1 commit
  32. 10 May, 2007 1 commit
  33. 06 May, 2007 1 commit
  34. 04 May, 2007 1 commit
  35. 03 May, 2007 1 commit
  36. 02 May, 2007 2 commits
    • Simon Marlow's avatar
      Refactoring, tidyup and improve layering · 86bec429
      Simon Marlow authored
      The stack of breakpoint resume contexts is now part of the
      InteractiveContext and managed by the GHC API.  This prevents misuse
      of the resume context by the client (e.g. resuming a breakpoint that
      isn't the topmost, which would lead to a confused IC at the least).
      
      I changed the TypeEnv in the IC to a [Id].  It only contained Ids
      anyway, and this allows us to have shadowing, which removes an ugly
      and annoying restriction.
      
      The parts of the GHC API which deal with interactive evaluation are
      now in a module of their own, InteractiveEval.
      86bec429
    • simonpj@microsoft.com's avatar
      Do not generate warnings for compiler-generated code · c94fac1c
      simonpj@microsoft.com authored
      Fixes Trac #1313
      c94fac1c
  37. 25 Apr, 2007 2 commits