1. 29 Feb, 2020 13 commits
    • Roland Senn's avatar
      Show breakpoint locations of breakpoints which were ignored during :force (#2950) · 3979485b
      Roland Senn authored
      GHCi is split up into 2 major parts: The user-interface (UI)
      and the byte-code interpreter. With `-fexternal-interpreter`
      they even run in different processes. Communication between
      the UI and the Interpreter (called `iserv`) is done using
      messages over a pipe. This is called `Remote GHCI` and
      explained in the Note [Remote GHCi] in `compiler/ghci/GHCi.hs`.
      To process a `:force` command the UI sends a `Seq` message
      to the `iserv` process. Then `iserv` does the effective
      evaluation of the value. When during this process a breakpoint
      is hit, the `iserv` process has no additional information to
      enhance the `Ignoring breakpoint` output with the breakpoint
      To be able to print additional breakpoint information,
      there are 2 possible implementation choices:
      1. Store the needed information in the `iserv` process.
      2. Print the `Ignoring breakpoint` from the UI process.
      For option 1 we need to store the breakpoint info redundantely
      in 2 places and this is bad. Therfore option 2 was implemented
      in this MR:
      - The user enters a `force` command
      - The UI sends  a `Seq` message to the `iserv` process.
      - If processing of the `Seq` message hits a breakpoint,
        the `iserv` process returns control to the UI process.
      - The UI looks up the source location of the breakpoint,
        and prints the enhanced `Ignoring breakpoint` output.
      - The UI sends a `ResumeSeq` message to the `iserv` process,
        to continue forcing.
    • Ömer Sinan Ağacan's avatar
      Simplify IfaceIdInfo type · 04d30137
      Ömer Sinan Ağacan authored
      IfaceIdInfo type is confusing: there's practically no difference between
      `NoInfo` and `HasInfo []`. The comments say NoInfo is used when
      -fomit-interface-pragmas is enabled, but we don't need to distinguish
      `NoInfo` from `HasInfo []` in when reading the interface so the
      distinction is not important.
      This patch simplifies the type by removing NoInfo. When we have no info
      we use an empty list.
      With this change we no longer read the info list lazily when reading an
      IfaceInfoItem, but when reading an IfaceId the ifIdInfo field is
      read lazily, so I doubt this is going to be a problem.
    • Sylvain Henry's avatar
      Fix Hadrian's ``--configure`` (fix #17883) · 34c7d230
      Sylvain Henry authored
    • Jean-Baptiste Mazon's avatar
    • Adam Sandberg Eriksson's avatar
    • Adam Sandberg Eriksson's avatar
    • Sylvain Henry's avatar
      Refactor runtime interpreter code · 18757cab
      Sylvain Henry authored
      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
      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.
    • Ömer Sinan Ağacan's avatar
      Document and refactor a few things around bitmap scavenging · b5fb58fd
      Ömer Sinan Ağacan authored
      - Added a few comments in StgPAP
      - Added a few comments and assertions in scavenge_small_bitmap and
      - Did tiny refactor in GHC.Data.Bitmap: added some comments, deleted
        dead code, used PlatformWordSize type.
    • xldenis's avatar
      Rename ghci.sh and build.sh to ghci and build respectively · a999ee96
      xldenis authored
      Convert hadrian buildscripts to unsuffixed, dashed form
      final cleanups
    • Ben Gamari's avatar
      plugins: Ensure that loadInterface plugins can see annotations · 99d2de86
      Ben Gamari authored
      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.
    • Vladislav Zavialov's avatar
      Monotonic locations (#17632) · 327b29e1
      Vladislav Zavialov authored
      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
      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
      Updates haddock submodule.
      Metric Increase:
    • Ilias Tsitsimpis's avatar
      llvm-targets: Add arm-unknown-linux-gnueabi · 37f12603
      Ilias Tsitsimpis authored
      Add arm-unknown-linux-gnueabi, which is used by Debian's ARM EABI port
      (armel), as an LLVM target.
    • Simon Peyton Jones's avatar
      Improve error handling for VTA + deferred type errors · 66f5d6d6
      Simon Peyton Jones authored
      This fixes #17792
      See Note [VTA for out-of-scope functions] in TcExpr
  2. 28 Feb, 2020 3 commits
  3. 27 Feb, 2020 2 commits
    • Adam Sandberg Eriksson's avatar
    • Sebastian Graf's avatar
      PmCheck: Implement Long-distance information with Covered sets · 74311e10
      Sebastian Graf authored
      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`
      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:
  4. 26 Feb, 2020 18 commits
  5. 25 Feb, 2020 3 commits
  6. 24 Feb, 2020 1 commit