1. 24 Feb, 2019 10 commits
    • Vladislav Zavialov's avatar
      ae7d1ff6
    • Vladislav Zavialov's avatar
      User's Guide: update info on kind inference · 88970187
      Vladislav Zavialov authored
      We no longer put class variables in front,
      see "Taming the Kind Inference Monster"
      
      (also fix some markup issues)
      88970187
    • Sebastian Graf's avatar
      Include closure header size in StgLamLift's estimations · b85068f6
      Sebastian Graf authored
      While playing around with late lambda lifting, I realised that
      StgLamLift.Analysis doesn't consider the removed closure header in its
      allocation estimations.
      
      That's because contrary to what I thought, the total word count returned
      by `mkVirtHeapOffsets` doesn't include the size of the closure header.
      
      We just add the header size manually now.
      b85068f6
    • Ben Gamari's avatar
      gitlab-ci: Only build x86_64-deb8 and fedora27 for releases · 1059e234
      Ben Gamari authored
      These are largely redundant as they are covered by x86_64-deb9.
      1059e234
    • Matthew Pickering's avatar
      Exit with exit code 1 when tests unexpectedly pass · a990312e
      Matthew Pickering authored
      This was causing gitlab to not report from builds as failing. It also
      highlighted a problem with the LLVM tests where some of the external
      interpreter tests are failing.
      a990312e
    • Herbert Valerio Riedel's avatar
      Fix regression incorrectly advertising TH support · ee284b85
      Herbert Valerio Riedel authored
      `--supported-languages` must only advertise language extensions
      which are supported by the compiler in order for tooling such
      as Cabal relying on this signalling not to behave incorrectly.
      
      Fixes #16331
      ee284b85
    • Vladislav Zavialov's avatar
      Expression/command ambiguity resolution · e61f6e35
      Vladislav Zavialov authored
      This patch removes 'HsArrApp' and 'HsArrForm' from 'HsExpr' by
      introducing a new ambiguity resolution system in the parser.
      
      Problem: there are places in the grammar where we do not know whether we
      are parsing an expression or a command:
      
      	proc x -> do { (stuff) -< x }   -- 'stuff' is an expression
      	proc x -> do { (stuff) }        -- 'stuff' is a command
      
      Until we encounter arrow syntax (-<) we don't know whether to parse
      'stuff' as an expression or a command.
      
      The old solution was to parse as HsExpr always, and rejig later:
      
      	checkCommand :: LHsExpr GhcPs -> P (LHsCmd GhcPs)
      
      This meant polluting 'HsExpr' with command-related constructors. In
      other words, limitations of the parser were affecting the AST, and
      all other code (the renamer, the typechecker) had to deal with these
      extra constructors by panicking.
      
      We fix this abstraction leak by parsing into an intermediate
      representation, 'ExpCmd':
      
      	data ExpCmdG b where
      	  ExpG :: ExpCmdG HsExpr
      	  CmdG :: ExpCmdG HsCmd
      
      	type ExpCmd = forall b. ExpCmdG b -> PV (Located (b GhcPs))
      
      	checkExp :: ExpCmd -> PV (LHsExpr GhcPs)
      	checkCmd :: ExpCmd -> PV (LHsCmd GhcPs)
      	checkExp f = f ExpG  -- interpret as an expression
      	checkCmd f = f CmdG  -- interpret as a command
      
      See Note [Ambiguous syntactic categories] for details.
      
      Now the intricacies of parsing have no effect on the hsSyn AST when it
      comes to the expression/command ambiguity.
      
      Future work: apply the same principles to the expression/pattern
      ambiguity.
      e61f6e35
    • Simon Peyton Jones's avatar
      Add AnonArgFlag to FunTy · 6cce36f8
      Simon Peyton Jones authored
      The big payload of this patch is:
      
        Add an AnonArgFlag to the FunTy constructor
        of Type, so that
          (FunTy VisArg   t1 t2) means (t1 -> t2)
          (FunTy InvisArg t1 t2) means (t1 => t2)
      
      The big payoff is that we have a simple, local test to make
      when decomposing a type, leading to many fewer calls to
      isPredTy. To me the code seems a lot tidier, and probably
      more efficient (isPredTy has to take the kind of the type).
      
      See Note [Function types] in TyCoRep.
      
      There are lots of consequences
      
      * I made FunTy into a record, so that it'll be easier
        when we add a linearity field, something that is coming
        down the road.
      
      * Lots of code gets touched in a routine way, simply because it
        pattern matches on FunTy.
      
      * I wanted to make a pattern synonym for (FunTy2 arg res), which
        picks out just the argument and result type from the record. But
        alas the pattern-match overlap checker has a heart attack, and
        either reports false positives, or takes too long.  In the end
        I gave up on pattern synonyms.
      
        There's some commented-out code in TyCoRep that shows what I
        wanted to do.
      
      * Much more clarity about predicate types, constraint types
        and (in particular) equality constraints in kinds.  See TyCoRep
        Note [Types for coercions, predicates, and evidence]
        and Note [Constraints in kinds].
      
        This made me realise that we need an AnonArgFlag on
        AnonTCB in a TyConBinder, something that was really plain
        wrong before. See TyCon Note [AnonTCB InivsArg]
      
      * When building function types we must know whether we
        need VisArg (mkVisFunTy) or InvisArg (mkInvisFunTy).
        This turned out to be pretty easy in practice.
      
      * Pretty-printing of types, esp in IfaceType, gets
        tidier, because we were already recording the (->)
        vs (=>) distinction in an ad-hoc way.  Death to
        IfaceFunTy.
      
      * mkLamType needs to keep track of whether it is building
        (t1 -> t2) or (t1 => t2).  See Type
        Note [mkLamType: dictionary arguments]
      
      Other minor stuff
      
      * Some tidy-up in validity checking involving constraints;
        Trac #16263
      6cce36f8
    • Simon Peyton Jones's avatar
      Remove bogus assertion · ac34e784
      Simon Peyton Jones authored
      Remove a bogus assertion in FamInst.newFamInst
      (There is a comment to explain.)
      
      This fixes Trac #16112.
      ac34e784
    • syd@cs-syd.eu's avatar
      hWaitForInput-accurate-socket test · 2e9426df
      syd@cs-syd.eu authored
      2e9426df
  2. 23 Feb, 2019 4 commits
  3. 22 Feb, 2019 9 commits
  4. 21 Feb, 2019 4 commits
  5. 20 Feb, 2019 9 commits
  6. 19 Feb, 2019 4 commits