Skip to content
Snippets Groups Projects
  1. Dec 18, 2017
  2. Dec 15, 2017
    • 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.
      3910d3e2
    • 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.
      68149452
  3. Dec 14, 2017
  4. Dec 13, 2017
    • Gabor Greif's avatar
      Typofix in comment · 6eb32579
      Gabor Greif authored
      6eb32579
    • 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.
      0a12d92a
    • 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!
      63e968a9
    • Simon Peyton Jones's avatar
      Add missing stderr for Trac #14561 · aef4dee8
      Simon Peyton Jones authored
      aef4dee8
    • 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
      321b420f
    • 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.
      e40db7b1
    • 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
      a106a200
  5. Dec 12, 2017
  6. Dec 11, 2017
  7. Dec 08, 2017
    • 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
      tree.
      4335c07c
    • 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.
      7733e44d
    • 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
      breaker.
      
      Implementation is easy too, but it needs a little extra plubming,
      notably the occ_unf_act field in OccEnv
      5695f462
    • 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
      800009d9
    • 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
      de204409
  8. Dec 07, 2017
    • Herbert Valerio Riedel's avatar
      Revert accidental hsc2hs submodule downgrade · e4a1f032
      Herbert Valerio Riedel authored
      This submodule update was committed unintentionally in
      fa29df02
      e4a1f032
    • Simon Peyton Jones's avatar
      Refactor ConDecl: Trac #14529 · fa29df02
      Simon Peyton Jones authored
      This patch refactors HsDecls.ConDecl.  Specifically
      
      * ConDeclGADT was horrible, with all the information hidden
        inside con_res_ty.  Now it's kept separate, as it should be.
      
      * ConDeclH98: use [LHsTyVarBndr] instead of LHsQTyVars for the
        existentials. There is no implicit binding here.
      
      * Add a field con_forall to both ConDeclGADT and ConDeclH98
        which says if there is an explicit user-written forall.
      
      * Field renamings in ConDecl
           con_cxt     to con_mb_cxt
           con_details to con_args
      
      There is an accompanying submodule update to Haddock.
      
      Also the following change turned out to remove a lot of clutter:
      
      * add a smart constructor for HsAppsTy, namely mkHsAppsTy,
        and use it consistently. This avoids a lot of painful pattern
        matching for the common singleton case.
      
      Two api-annotation tests (T10278, and T10399) are broken, hence marking
      them as expect_broken(14529).  Alan is going to fix them, probably by
      changing the con_forall field to
         con_forall :: Maybe SrcSpan
      instead of Bool
      fa29df02
Loading