Skip to content
Snippets Groups Projects
  1. Feb 29, 2020
    • adam's avatar
      docs: correct link to th haddocks from users guide · 0f55df7f
      adam authored and Marge Bot's avatar Marge Bot committed
      0f55df7f
    • adam's avatar
      docs: correct relative links to haddocks from users guide (fixes #17866) · b86a6395
      adam authored and Marge Bot's avatar Marge Bot committed
      b86a6395
    • Sylvain Henry's avatar
      Refactor runtime interpreter code · 18757cab
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      In #14335 we want to be able to use both the internal interpreter (for
      the plugins) and the external interpreter (for TH and GHCi) at the same
      time.
      
      This patch performs some preliminary refactoring: the `hsc_interp` field
      of HscEnv replaces `hsc_iserv` and is now used to indicate which
      interpreter (internal, external) to use to execute TH and GHCi.
      
      Opt_ExternalInterpreter flag and iserv options in DynFlags are now
      queried only when we set the session DynFlags. It should help making GHC
      multi-target in the future by selecting an interpreter according to the
      selected target.
      18757cab
    • Ömer Sinan Ağacan's avatar
      Document and refactor a few things around bitmap scavenging · b5fb58fd
      Ömer Sinan Ağacan authored and Marge Bot's avatar Marge Bot committed
      - Added a few comments in StgPAP
      - Added a few comments and assertions in scavenge_small_bitmap and
        walk_large_bitmap
      - Did tiny refactor in GHC.Data.Bitmap: added some comments, deleted
        dead code, used PlatformWordSize type.
      b5fb58fd
    • xldenis's avatar
      Rename ghci.sh and build.sh to ghci and build respectively · a999ee96
      xldenis authored and Marge Bot's avatar Marge Bot committed
      Convert hadrian buildscripts to unsuffixed, dashed form
      
      final cleanups
      a999ee96
    • Ben Gamari's avatar
      plugins: Ensure that loadInterface plugins can see annotations · 99d2de86
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      loadInterface replaces the `mi_decls`, `mi_insts`, `mi_fam_insts`,
      `mi_rules`, `mi_anns` fields of ModIface with `undefined` before
      inserting the interface into the EPS. However, we still want to give
      loadInterface plugins access to these fields. Consequently, we want to
      pass the unmodified `ModIface` the plugin.
      99d2de86
    • Vladislav Zavialov's avatar
      Monotonic locations (#17632) · 327b29e1
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      When GHC is parsing a file generated by a tool, e.g. by the C preprocessor, the
      tool may insert #line pragmas to adjust the locations reported to the user.
      
      As the result, the locations recorded in RealSrcLoc are not monotonic. Elements
      that appear later in the StringBuffer are not guaranteed to have a higher
      line/column number.
      
      In fact, there are no guarantees whatsoever, as #line pragmas can arbitrarily
      modify locations. This lack of guarantees makes ideas such as #17544
      infeasible.
      
      This patch adds an additional bit of information to every SrcLoc:
      
      	newtype BufPos = BufPos { bufPos :: Int }
      
      A BufPos represents the location in the StringBuffer, unaffected by any
      pragmas.
      
      Updates haddock submodule.
      
      Metric Increase:
          haddock.Cabal
          haddock.base
          haddock.compiler
          MultiLayerModules
          Naperian
          parsing001
          T12150
      327b29e1
    • Ilias Tsitsimpis's avatar
      llvm-targets: Add arm-unknown-linux-gnueabi · 37f12603
      Ilias Tsitsimpis authored and Marge Bot's avatar Marge Bot committed
      Add arm-unknown-linux-gnueabi, which is used by Debian's ARM EABI port
      (armel), as an LLVM target.
      37f12603
    • Simon Peyton Jones's avatar
      Improve error handling for VTA + deferred type errors · 66f5d6d6
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      This fixes #17792
      
      See Note [VTA for out-of-scope functions] in TcExpr
      66f5d6d6
  2. Feb 28, 2020
  3. Feb 27, 2020
    • adam's avatar
      configure: correctly generate LIBRARY_template_haskell_VERSION · 59c023ba
      adam authored and Marge Bot's avatar Marge Bot committed
      59c023ba
    • Sebastian Graf's avatar
      PmCheck: Implement Long-distance information with Covered sets · 74311e10
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      Consider
      
      ```hs
      data T = A | B | C
      
      f :: T -> Int
      f A = 1
      f x = case x of
        A -> 2
        B -> 3
        C -> 4
      ```
      
      Clearly, the RHS returning 2 is redundant. But we don't currently see
      that, because our approximation to the covered set of the inner case
      expression just picks up the positive information from surrounding
      pattern matches. It lacks the context sensivity that `x` can't be `A`
      anymore!
      
      Therefore, we adopt the conceptually and practically superior approach
      of reusing the covered set of a particular GRHS from an outer pattern
      match. In this case, we begin checking the `case` expression with the
      covered set of `f`s second clause, which encodes the information that
      `x` can't be `A` anymore. After this MR, we will successfully warn about
      the RHS returning 2 being redundant.
      
      Perhaps surprisingly, this was a great simplification to the code of
      both the coverage checker and the desugarer.
      
      Found a redundant case alternative in `unix` submodule, so we have to
      bump it with a fix.
      
      Metric Decrease:
          T12227
      74311e10
  4. Feb 26, 2020
  5. Feb 25, 2020
  6. Feb 24, 2020
    • Ben Gamari's avatar
      Bump directory submodule to 1.3.6.0 · 84dd9610
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      84dd9610
    • Ben Gamari's avatar
      users-guide: Drop old release notes · e3f17413
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      e3f17413
    • Ben Gamari's avatar
      users-guide: Shuffle text · 5aa6c188
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      5aa6c188
    • Vladislav Zavialov's avatar
      Remove Ord SrcLoc, Ord SrcSpan · 26e8fff3
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      Before this patch, GHC relied on Ord SrcSpan to identify source elements, by
      using SrcSpan as Map keys:
      
      	blackList :: Map SrcSpan ()      -- compiler/GHC/HsToCore/Coverage.hs
      	instanceMap :: Map SrcSpan Name  -- compiler/GHC/HsToCore/Docs.hs
      
      Firstly, this design is not valid in presence of UnhelpfulSpan, as it
      distinguishes between  UnhelpfulSpan "X"  and  UnhelpfulSpan "Y", but those
      strings are messages for the user, unfit to serve as identifiers for source
      elements.
      
      Secondly, this design made it hard to extend SrcSpan with additional data.
      Recall that the definition of SrcSpan is:
      
      	data SrcSpan =
      	    RealSrcSpan !RealSrcSpan
      	  | UnhelpfulSpan !FastString
      
      Say we want to extend the RealSrcSpan constructor with additional information:
      
      	data SrcSpan =
      	    RealSrcSpan !RealSrcSpan !AdditionalInformation
      	  | UnhelpfulSpan !FastString
      
      	getAdditionalInformation :: SrcSpan -> AdditionalInformation
      	getAdditionalInformation (RealSrcSpan _ a) = a
      
      Now, in order for  Map SrcSpan  to keep working correctly, we must *ignore* additional
      information when comparing SrcSpan values:
      
      	instance Ord SrcSpan where
      	  compare (RealSrcSpan r1 _) (RealSrcSpan r2 _) = compare r1 r2
      	  ...
      
      However, this would violate an important law:
      
      	a == b  therefore  f a == f b
      
      Ignoring  AdditionalInformation  in comparisons would mean that with
      f=getAdditionalInformation, the law above does not hold.
      
      A more robust design is to avoid  Ord SrcSpan  altogether, which is what this patch implements.
      The mappings are changed to use RealSrcSpan instead:
      
      	blackList :: Set RealSrcSpan         -- compiler/GHC/HsToCore/Coverage.hs
      	instanceMap :: Map RealSrcSpan Name  -- compiler/GHC/HsToCore/Docs.hs
      
      All SrcSpan comparisons are now done with explicit comparison strategies:
      
      	SrcLoc.leftmost_smallest
      	SrcLoc.leftmost_largest
      	SrcLoc.rightmost_smallest
      
      These strategies are not subject to the law mentioned above and can easily
      discard both the string stored in  UnhelpfulSpan  and  AdditionalInformation.
      
      Updates haddock submodule.
      26e8fff3
  7. Feb 23, 2020
Loading