1. 20 Jun, 2015 6 commits
  2. 19 Jun, 2015 4 commits
  3. 18 Jun, 2015 12 commits
    • Simon Peyton Jones's avatar
      Elaborate test for Trac #10403 · c45f8ceb
      Simon Peyton Jones authored
      c45f8ceb
    • Simon Peyton Jones's avatar
      Test Trac #10503 · ba7c8e59
      Simon Peyton Jones authored
      ba7c8e59
    • Alan Zimmerman's avatar
      Parser: commas_tup_tail duplicate SrcSpan on "Missing" value · 72b21c39
      Alan Zimmerman authored
      Summary:
      Parsing
      
          {-# LANGUAGE TupleSections #-}
      
          baz = (1, "hello", 6.5,,) 'a' (Just ())
      
      Results in the following AST fragment
      
          (L tests/examples/Tuple.hs:3:7-25
             (ExplicitTuple
                [ L tests/examples/Tuple.hs:3:8
                    (Present
                       (L tests/examples/Tuple.hs:3:8
                          (HsOverLit
                             (OverLit
                                (HsIntegral [ '1' ] 1)
                                PlaceHolder
                                (HsLit
                                   (HsString
                                      []
                                      {abstract:FastString}))
                                PlaceHolder))))
                , L tests/examples/Tuple.hs:3:11-17
                    (Present
                       (L tests/examples/Tuple.hs:3:11-17
                          (HsLit
                             (HsString
                                [ '"'
                                , 'h'
                                , 'e'
                                , 'l'
                                , 'l'
                                , 'o'
                                , '"'
                                ]
                                {abstract:FastString}))))
                , L tests/examples/Tuple.hs:3:20-22
                    (Present
                       (L tests/examples/Tuple.hs:3:20-22
                          (HsOverLit
                             (OverLit
                                (HsFractional
                                   (FL
                                      [ '6' , '.' , '5' ]
                                      (:% 13 2)))
                                PlaceHolder
                                (HsLit
                                   (HsString
                                      []
                                      {abstract:FastString}))
                                PlaceHolder))))
                , L tests/examples/Tuple.hs:3:24
                    (Missing PlaceHolder)
                , L tests/examples/Tuple.hs:3:24
                    (Missing PlaceHolder)
                ]
      
      The final `Missing PlaceHolder` has a duplicated `SrcSpan`
      
      Test Plan: ./validate
      
      Reviewers: austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie, bgamari, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D995
      
      GHC Trac Issues: #10537
      72b21c39
    • Simon Peyton Jones's avatar
      Trac #4945 is working again · 5d98b682
      Simon Peyton Jones authored
      This test greps in the ouput of -ddump-simpl, so it's fragile.
      It stopped working for a while, but now works again. I don't know
      why, but I don't have time to investigate, so I'll just mark it
      as ok.
      5d98b682
    • Simon Peyton Jones's avatar
      Refactor filterAlts into two parts · ee643698
      Simon Peyton Jones authored
      This splits filterAlts into two:
       - filterAlts
       - refineDefaultAlt
      
      No change in functionality
      ee643698
    • Simon Peyton Jones's avatar
      Comments plus tiny refactoring · 0899911c
      Simon Peyton Jones authored
      0899911c
    • Simon Peyton Jones's avatar
      A bit more tracing · 760b079d
      Simon Peyton Jones authored
      760b079d
    • Simon Peyton Jones's avatar
      Remove some horrible munging of origins for Coercible · 02bac025
      Simon Peyton Jones authored
      I just didn't think it was buying enough for all the cruft it caused.
      We can put some back if people start complaining about poor error
      messages. I forget quite how I tripped over this but I got sucked in.
      
      * Lots of tidying up in TcErrors
      
      * Rename pprArisingAt to pprCtLoc, by analogy with pprCtOrigin
      
      * Remove CoercibleOrigin data constructor from CtOrigin
      
      * Make relevantBindings return a Ct with a zonked
        and tidied CtOrigin
      
      * Add to TcRnTypes
            ctOrigin   :: Ct -> CtOrigin
            ctEvOrigin :: CtEvidence -> CtOrigin
            setCtLoc   :: Ct -> CtLoc -> Ct
      02bac025
    • Simon Peyton Jones's avatar
      Rename getCtLoc, setCtLoc · 4a7a6c3a
      Simon Peyton Jones authored
      getCtLoc -> getCtLocM
      setCtLoc -> setCtLocM
      
      These operations are monadic, and I want to introduce a
      pure version of setCtLoc :: Ct -> CtLoc -> Ct
      4a7a6c3a
    • Simon Peyton Jones's avatar
      Comments only · f4370c61
      Simon Peyton Jones authored
      Rewording in
        Note [Decomposing equality]
        Note [Decomposing newtypes at representational role]
      
      Richard you may want to check, but I think it's fine.
      f4370c61
    • Simon Peyton Jones's avatar
      Report arity errors correctly despite kinds · 5879d5aa
      Simon Peyton Jones authored
      Trac #10516 pointed out that when reporting arity errors
      (like "T needs 2 arguments but has been given 1"), we should
      not count kind arguments, since they are implicit.  If we
      include kind args in the count, we get very confusing error
      messages indeed.
      
      I did a little bit of refactoring which make some
      error messages wobble around.  But the payload of
      this fix is in TcValidity.tyConArityErr
      5879d5aa
    • Simon Peyton Jones's avatar
      Care with impossible-cons in combineIdenticalAlts · 023a0ba9
      Simon Peyton Jones authored
      This was a nasty, long-standing bug exposed in Trac #10538.
      Symptoms were that we had an empty case
         case (x :: Either a) of {}
      Core Lint correctly picked this bogus code up.
      
      Here is what happened
      
      * In SimplUtils.prepareAlts, we call
              filterAlts
        then
              combineIdenticalAlts
      
      * We had    case x of { Left _ -> e1; Right _ -> e1 }
      
      * filterAlts did nothing, but correctly retuned imposs_deflt_cons
        saying that 'x' cannot be {Left, Right} in the DEFAULT branch,
        if any (there isn't one.)
      
      * combineIdentialAlts correctly combines the identical alts, to give
           case x of { DEFAULT -> e1 }
      
      * BUT combineIdenticalAlts did no adjust imposs_deft_cons
      
      * Result: when compiling e1 we did so in the belief that 'x'
        could not be {Left,Right}.  Disaster.
      
      Easily fixed.
      
      (It is hard to trigger; I can't construct a simple test case.)
      023a0ba9
  4. 16 Jun, 2015 18 commits