1. 18 Dec, 2017 4 commits
  2. 15 Dec, 2017 2 commits
    • Richard Eisenberg's avatar
      Add some commentary re: fix to #11203 · 3910d3e2
      Richard Eisenberg authored
      The fix for #11203 prohibits duplicate SigTvs in non-CUSK kind
      signatures by checking for duplicates after type inference is
      done. This works well. GHC also checks for duplicate SigTvs
      after working with partial type signatures (another place where
      SigTvs arise). However, neither fix eliminates this whole class
      of problems (because doing so would be heavier than we would
      like). So, this comment adds a warning to users of newSigTyVar
      to be aware of problems with duplicates.
    • Simon Peyton Jones's avatar
      Fix tcDataKindSig · 68149452
      Simon Peyton Jones authored
      This patch fixes an outright bug in tcDataKindSig, shown up in Trac
      of a data type declaration.  See Note [TyConBinders for the result kind
      signature of a data type]
      I also took the opportunity to elminate the DataKindCheck argument
      and data type from tcDataKindSig, instead moving the check to the
      call site, which is easier to understand.
  3. 14 Dec, 2017 7 commits
  4. 13 Dec, 2017 7 commits
    • Gabor Greif's avatar
      Typofix in comment · 6eb32579
      Gabor Greif authored
    • Simon Peyton Jones's avatar
      Further improvements to well-kinded types · 0a12d92a
      Simon Peyton Jones authored
      The typechecker has the invariant that every type should be well-kinded
      as it stands, without zonking.  See Note [The well-kinded type invariant]
      in TcType.
      That invariant was not being upheld, which led to Trac #14174.  I fixed
      part of it, but T14174a showed that there was more.  This patch finishes
      the job.
      * See Note [The tcType invariant] in TcHsType, which articulates an
        invariant that was very nearly, but not quite, true.  One place that
        falisified it was the HsWildCardTy case of tc_hs_type, so I fixed that.
      * mkNakedCastTy now makes no attempt to eliminate casts; indeed it cannot
        lest it break Note [The well-kinded type invariant].  The prior comment
        suggested that it was crucial for performance but happily it seems not
        to be. The extra Refls are eliminated by the zonker.
      * I found I could tidy up TcHsType.instantiateTyN and instantiateTyUntilN
        by eliminating one of its parameters.  That led to a cascade of minor
        improvements in TcTyClsDecls. Hooray.
    • Simon Peyton Jones's avatar
      Re-centre perf for T5321Fun · 63e968a9
      Simon Peyton Jones authored
      Bytes allocated has fallen by around 5%. I think this due
      to some of my recent refactoring of the typechecker, but
      I'm not certain about exactly which change did it.
      Good though!
    • Simon Peyton Jones's avatar
      Add missing stderr for Trac #14561 · aef4dee8
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Tidy up of wired-in names · 321b420f
      Simon Peyton Jones authored
      Two things here:
      * While debugging Trac #14561 I found it hard to understand
        ghcPrimIds and magicIds in MkId.  This patch adds more
        structure and comments.
      * I also discovered that ($) no longer needs to be a wiredInId
        because we now have levity polymorphism.  So I took dollarId
        out of MkId; and gave it a levity-polymorphic type in GHC.Base
    • Simon Peyton Jones's avatar
      Detect levity-polymorphic uses of unsafeCoerce# · e40db7b1
      Simon Peyton Jones authored
      This bug was shown up by Trac #14561. The deguarer carefully
      detects unsaturated and levity-polymorphic uses of primops,
      but not of things like unsafeCoerce#.
      The fix is simple: see Note [Levity-polymorphic Ids] in Id.
    • Simon Peyton Jones's avatar
      Minor refactor of TcExpr.tcApp · a106a200
      Simon Peyton Jones authored
      This refactoring has no change in behaviour but makes the
      structure clearer
  5. 12 Dec, 2017 1 commit
  6. 11 Dec, 2017 13 commits
  7. 08 Dec, 2017 5 commits
    • Ben Gamari's avatar
      Add hadrian as a submodule · 4335c07c
      Ben Gamari authored
      It will remain a submodule until we are ready to merge Hadrian into the
    • Ben Gamari's avatar
      Rip out hadrian subtree · 7733e44d
      Ben Gamari authored
      Sadly subtrees haven't worked quite as well as we would have liked for
      developers. See Hadrian #440.
    • Simon Peyton Jones's avatar
      Occurrrence analysis improvements for NOINLINE functions · 5695f462
      Simon Peyton Jones authored
      This patch fixes #14567.  The idea is simple: if a function
      is marked NOINLINE then it makes a great candidate for a loop
      Implementation is easy too, but it needs a little extra plubming,
      notably the occ_unf_act field in OccEnv
    • Simon Peyton Jones's avatar
      Improve LiberateCase · 800009d9
      Simon Peyton Jones authored
      This patch, which fixes Trac #14566, makes LiberateCase a little
      more conservative.  In particular:
      * In libCaseBind, treat a recursive group as a whole, rather than
        binding-by-binding, allowing the group to be duplicated only if
          - the bindings /considered together/ are smaller than the
            liberate-case threshold (which is large by default)
          - none of them are thunks
          - none of them are guaranteed-diverging
        The latter condidtion is new, and happens to apply in the
        case of Data/Typeable/Internal.mkTrApp
    • Simon Peyton Jones's avatar
      Refactor kcHsTyVarBndrs · de204409
      Simon Peyton Jones authored
      This refactoring
      * Renames kcHsTyVarBndrs to kcLHsQTyVars,
        which is more truthful. It is only used in getInitialKind.
      * Pulls out bind_telescope from that function, and calls it
        kcLHsTyVarBndrs, again to reflect its argument
      * Uses the new kcLHsTyVarBndrs in kcConDecl, where the old
        function was wild overkill.
      There should not be any change in behaviour
  8. 07 Dec, 2017 1 commit