1. 25 Apr, 2019 3 commits
    • Ömer Sinan Ağacan's avatar
      Minor RTS refactoring: · 4e228267
      Ömer Sinan Ağacan authored
      - Remove redundant casting in evacuate_static_object
      - Remove redundant parens in STATIC_LINK
      - Fix a typo in GC.c
      4e228267
    • Vladislav Zavialov's avatar
      checkPattern error hint is PV context · f85efdec
      Vladislav Zavialov authored
      There is a hint added to error messages reported in checkPattern.
      Instead of passing it manually, we put it in a ReaderT environment inside PV.
      f85efdec
    • Vladislav Zavialov's avatar
      Introduce MonadP, make PV a newtype · 0fc69416
      Vladislav Zavialov authored
      Previously we defined   type PV = P,
      this had the downside that if we wanted to change PV,
      we would have to modify P as well.
      
      Now PV is free to evolve independently from P.
      
      The common operations addError, addFatalError, getBit, addAnnsAt,
      were abstracted into a class called MonadP.
      0fc69416
  2. 24 Apr, 2019 1 commit
  3. 23 Apr, 2019 2 commits
  4. 22 Apr, 2019 3 commits
    • Vladislav Zavialov's avatar
      Stop misusing EWildPat in pattern match coverage checking · 1959bad3
      Vladislav Zavialov authored
      EWildPat is a constructor of HsExpr used in the parser to represent
      wildcards in ambiguous positions:
      
      * in expression context, EWildPat is turned into hsHoleExpr (see rnExpr)
      * in pattern context, EWildPat is turned into WildPat (see checkPattern)
      
      Since EWildPat exists solely for the needs of the parser, we could
      remove it by improving the parser.
      
      However, EWildPat has also been used for a different purpose since
      8a506104: to represent patterns that the coverage checker cannot handle.
      Not only this is a misuse of EWildPat, it also stymies the removal of
      EWildPat.
      1959bad3
    • Alp Mestanogullari's avatar
      Hadrian: use the testsuite driver's config.haddock arg more correctly · 51655fd8
      Alp Mestanogullari authored
      4 haddock tests assume that .haddock files have been produced, by using the
      'req_haddock' modifier. The testsuite driver assumes that this condition is
      satisfied if 'config.haddock' is non-empty, but before this patch Hadrian was
      always passing the path to where the haddock executable should be, regardless
      of whether it is actually there or not.
      
      Instead, we now pass an empty config.haddock when we can't find all of
      <build root>/docs/html/libraries/<pkg>/<pkg>.haddock>, where <pkg> ranges over
      array, base, ghc-prim, process and template-haskell, and pass the path
      to haddock when all those file exists. This has the (desired) effect of skipping
      the 4 tests (marked as 'missing library') when the docs haven't been built,
      and running the haddock tests when they have.
      51655fd8
    • Matthew Pickering's avatar
      Correct off by one error in ghci +c · 1a7a329b
      Matthew Pickering authored
      Fixes #16569
      1a7a329b
  5. 21 Apr, 2019 8 commits
  6. 20 Apr, 2019 10 commits
  7. 19 Apr, 2019 3 commits
    • Alec Theriault's avatar
      Add test case for #16384 · fdfd9731
      Alec Theriault authored
      Now that `TExp` accepts unlifted types, #16384 is fixed. Since the real
      issue there was GHC letting through an ill-kinded type which
      `-dcore-lint` rightly rejected, a reasonable regression test is that
      the program from #16384 can now be accepted without `-dcore-lint`
      complaining.
      fdfd9731
    • Alec Theriault's avatar
      TH: make `Lift` and `TExp` levity-polymorphic · 57cf1133
      Alec Theriault authored
      Besides the obvious benefits of being able to manipulate `TExp`'s of
      unboxed types, this also simplified `-XDeriveLift` all while making
      it more capable.
      
        * `ghc-prim` is explicitly depended upon by `template-haskell`
      
        * The following TH things are parametrized over `RuntimeRep`:
      
            - `TExp(..)`
            - `unTypeQ`
            - `unsafeTExpCoerce`
            - `Lift(..)`
      
        * The following instances have been added to `Lift`:
      
            - `Int#`, `Word#`, `Float#`, `Double#`, `Char#`, `Addr#`
            - unboxed tuples of lifted types up to arity 7
            - unboxed sums of lifted types up to arity 7
      
          Ideally we would have levity-polymorphic _instances_ of unboxed
          tuples and sums.
      
        * The code generated by `-XDeriveLift` uses expression quotes
          instead of generating large amounts of TH code and having
          special hard-coded cases for some unboxed types.
      57cf1133
    • Alp Mestanogullari's avatar
      Hadrian: fix the value we pass to the test driver for config.compiler_debugged · 5988f17a
      Alp Mestanogullari authored
      We used to pass YES/NO, while that particular field is set to True/False. This
      happens to fix an unexpected pass, T9208.
      5988f17a
  8. 18 Apr, 2019 4 commits
  9. 16 Apr, 2019 2 commits
    • Andrey Mokhov's avatar
      Hadrian: Generate GHC wrapper scripts · 894ec447
      Andrey Mokhov authored
      This is a temporary workaround for #16534. We generate wrapper scripts
      <build-root>/ghc-stage1 and <build-root>/ghc-stage2 that can be used to
      run Stage1 and Stage2 GHCs with the right arguments.
      
      See ghc/ghc#16534.
      894ec447
    • Dmitry Dolgov's avatar
      Show dynamic object files (#16062) · 57eb5bc6
      Dmitry Dolgov authored
      Closes #16062. When -dynamic-too is specified, reflect that in the
      progress message, like:
      
      $ ghc Main.hs -dynamic-too
      [1 of 1] Compiling Lib              ( Main.hs, Main.o, Main.dyn_o )
      
      instead of:
      
      $ ghc Main.hs -dynamic-too
      [1 of 1] Compiling Lib              ( Main.hs, Main.o )
      57eb5bc6
  10. 15 Apr, 2019 4 commits
    • Gabor Greif's avatar
      asm-emit-time IND_STATIC elimination · be05bd81
      Gabor Greif authored
      When a new closure identifier is being established to a
      local or exported closure already emitted into the same
      module, refrain from adding an IND_STATIC closure, and
      instead emit an assembly-language alias.
      
      Inter-module IND_STATIC objects still remain, and need to be
      addressed by other measures.
      
      Binary-size savings on nofib are around 0.1%.
      be05bd81
    • Fraser Tweedale's avatar
      users-guide: document :set local-config · ed94d345
      Fraser Tweedale authored
      Document the ':set local-config' command and add a warning about
      sourcing untrusted local .ghci scripts.
      
      Related: #6017
      Related: #14250
      ed94d345
    • Fraser Tweedale's avatar
      GHCi: add 'local-config' setting · aa490b35
      Fraser Tweedale authored
      Add the ':set local-config { source | ignore }' setting to control
      whether .ghci file in current directory will be sourced or not.  The
      directive can be set in global config or $HOME/.ghci, which are
      processed before local .ghci files.
      
      The default is "source", preserving current behaviour.
      
      Related: #6017
      Related: #14250
      aa490b35
    • Fraser Tweedale's avatar
      users-guide: update startup script order · 5c06b60d
      Fraser Tweedale authored
      Update users guide to match the new startup script order.  Also
      clarify that -ignore-dot-ghci does not apply to scripts specified
      via the -ghci-script option.
      
      Part of: #14689
      5c06b60d