1. 21 Apr, 2009 4 commits
    • Simon Marlow's avatar
      FIX #2682: banish silly cases of the "module Foo is not loaded" error · ef03a76a
      Simon Marlow authored
      In GHCi if you say 'import Foo' meaning to load a package module Foo,
      and Foo.hs is found on the search path, then GHCi replies "module Foo
      is not loaded", because it knows Foo refers to the source file rather
      than the package module, and you haven't loaded that module with
      :load.
      
      This is consistent with the usual module-finding semantics.  However,
      it isn't particularly useful.  And it leads to silly problems like not
      being able to start GHCi when you happen to be sitting in
      libraries/base, because GHCi thinks the Prelude hasn't been loaded.
      
      So now I've made a slight change to the way that 'import M' works: if
      M is loaded, then it refers to the loaded module, otherwise it looks
      for a package module M.  This does what the reporter of #2682 wanted,
      and since it turns an error condition into meaningful behaviour it
      can't break anything.  
      
      The only undesirable consequence is that 'import M' might refer to a
      different M than ':load M'.  Hopefully that won't lead to confusion.
      ef03a76a
    • Simon Marlow's avatar
      FIX #2500: Don't log warnings in getHeader · a70a6e39
      Simon Marlow authored
      a70a6e39
    • Simon Marlow's avatar
      add a DO NOT EDIT comment · 199dc742
      Simon Marlow authored
      199dc742
    • Simon Marlow's avatar
  2. 20 Apr, 2009 1 commit
    • Simon Marlow's avatar
      FIX #2845: Allow breakpoints on expressions with unlifted type · 709c9ce0
      Simon Marlow authored
      It turns out we can easily support breakpoints on expressions with
      unlifted types, by translating 
      
        case tick# of _ -> e
      
      into
      
        let f = \s . case tick# of _ -> e 
        in  f realWorld#
      
      instead of just a plain let-binding.  This is the same trick that GHC
      uses for abstracting join points of unlifted type.
      
      In #2845, GHC has eta-expanded the tick expression, changing the
      result type from IO a to (# State#, a #), which was the reason the
      tick was suddenly being ignored.  By supporting ticks on unlifted
      expressions we can make it work again, although some confusion might
      arise because _result will no longer be available (it now has
      unboxed-tuple type, so we can't bind it in the environment).  The
      underlying problem here is that GHC does transformations like
      eta-expanding the tick expressions, and there's nothing we can do to
      prevent that.
      709c9ce0
  3. 03 Apr, 2009 1 commit
  4. 20 Apr, 2009 3 commits
  5. 19 Apr, 2009 1 commit
  6. 18 Apr, 2009 3 commits
  7. 17 Apr, 2009 1 commit
    • waern's avatar
      Simplify the type grammar · ef70af35
      waern authored
      Simon P-J suggested the following simplifications in #3097:
      
      * Allow nested foralls in `ctype` just like in `ctypedoc`.
      * Use `gentype` rather than `type` in the LHS of type declarations.
      * Inline `type` in `ctype`.
      * Rename `gentype` to `type`.
      
      This patch does this. Also, the equivalent thing is done for documented types.
      ef70af35
  8. 13 Apr, 2009 5 commits
  9. 03 Apr, 2009 2 commits
  10. 07 Apr, 2009 1 commit
  11. 09 Apr, 2009 2 commits
    • simonpj@microsoft.com's avatar
      Fix Trac #3155: better error message when -XRankNTypes is omitted · 6c06fdc7
      simonpj@microsoft.com authored
      This patch sligtly re-adjusts the way in which the syntax of types 
      is handled:
      
       * In the lexer, '.' and '*' are always accepted in types
         (previously it was conditional).  This things can't mean
         anything else in H98, which is the only reason for doing things
         conditionally in the lexer.
      
       * As a result '.' in types is never treated as an operator.
         Instead, lacking a 'forall' keyword, it turns into a plain parse error.
      
       * Test for -XKindSignatures in the renamer when processing
           a) type variable bindings
           b) types with sigs (ty :: kind-sig)
      
       * Make -XKindSignatures be implied by -XTypeFamilies 
         Previously this was buried in the conditonal lexing of '*'
      6c06fdc7
    • simonpj@microsoft.com's avatar
  12. 04 Apr, 2009 1 commit
  13. 31 Mar, 2009 2 commits
  14. 03 Apr, 2009 2 commits
    • dias@eecs.tufts.edu's avatar
      eliminate warnings · 82ebc04b
      dias@eecs.tufts.edu authored
      82ebc04b
    • dias@eecs.tufts.edu's avatar
      Debugging by Sesame Street: · dc9db2a8
      dias@eecs.tufts.edu authored
      One of these things is not like the others:
      
      stdPattern :: [LRep] -> Maybe StgHalfWord
      stdPattern reps
        = case reps of
              []  -> Just ARG_NONE    -- just void args, probably
              [N] -> Just ARG_N
              [P] -> Just ARG_N
              [F] -> Just ARG_F
              [D] -> Just ARG_D
              [L] -> Just ARG_L
      
      Today's debugging session was brought to you by the letter P.
      dc9db2a8
  15. 31 Mar, 2009 1 commit
  16. 25 Mar, 2009 1 commit
  17. 23 Mar, 2009 6 commits
  18. 03 Apr, 2009 3 commits