Skip to content
Snippets Groups Projects
  1. Jun 21, 2023
  2. May 05, 2023
  3. Mar 21, 2023
  4. Sep 13, 2022
    • sheaf's avatar
      Diagnostic codes: acccept test changes · 362cca13
      sheaf authored and Marge Bot's avatar Marge Bot committed
      The testsuite output now contains diagnostic codes, so many tests need
      to be updated at once.
      We decided it was best to keep the diagnostic codes in the testsuite
      output, so that contributors don't inadvertently make changes to the
      diagnostic codes.
      362cca13
  5. Apr 01, 2022
    • Krzysztof Gogolewski's avatar
      Minor cleanup · 8334ff9e
      Krzysztof Gogolewski authored and Matthew Pickering's avatar Matthew Pickering committed
      - Remove unused functions exprToCoercion_maybe, applyTypeToArg,
        typeMonoPrimRep_maybe, runtimeRepMonoPrimRep_maybe.
      - Replace orValid with a simpler check
      - Use splitAtList in applyTysX
      - Remove calls to extra_clean in the testsuite; it does not do anything.
      
      Metric Decrease:
          T18223
      8334ff9e
  6. Apr 22, 2021
  7. Mar 28, 2021
    • Hannes Siebenhandl's avatar
      Add UnitId to Target record · 29d75863
      Hannes Siebenhandl authored and Marge Bot's avatar Marge Bot committed
      In the future, we want `HscEnv` to support multiple home units
      at the same time. This means, that there will be 'Target's that do
      not belong to the current 'HomeUnit'.
      
      This is an API change without changing behaviour.
      
      Update haddock submodule to incorporate API changes.
      29d75863
  8. Dec 14, 2020
  9. Aug 12, 2020
    • Sylvain Henry's avatar
      DynFlags: disentangle Outputable · accbc242
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      - put panic related functions into GHC.Utils.Panic
      - put trace related functions using DynFlags in GHC.Driver.Ppr
      
      One step closer making Outputable fully independent of DynFlags.
      
      Bump haddock submodule
      accbc242
  10. Apr 26, 2020
  11. Mar 29, 2020
  12. Feb 24, 2020
    • 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
  13. Feb 22, 2020
  14. Feb 08, 2020
  15. Dec 17, 2019
  16. Nov 08, 2019
  17. Nov 05, 2019
    • Peter Trommler's avatar
      testsuite: skip test requiring RTS linker on PowerPC · 487ede42
      Peter Trommler authored and Marge Bot's avatar Marge Bot committed
      The RTS linker is not available on 64-bit PowerPC. Instead of
      marking tests that require the RTS linker as broken on PowerPC
      64-bit skip the respective tests on all platforms where the
      RTS linker or a statically linked external interpreter is not
      available.
      
      Fixes #11259
      487ede42
  18. Oct 17, 2019
    • Ben Gamari's avatar
      testsuite: Ensure that makefile tests get run · b15a7fb8
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Previously `makefile_test` and `run_command` tests could easily end up
      in a situation where they wouldn't be run if the user used the
      `only_ways` modifier. The reason is to build the set of a ways to run
      the test in we first start with a candidate set determined by the test
      type (e.g. `makefile_test`, `compile_run`, etc.) and then filter that
      set with the constraints given by the test's modifiers.
      
      `makefile_test` and `run_command` tests' candidate sets were simply
      `{normal}`, and consequently most uses of `only_ways` would result in
      the test being never run.
      
      To avoid this we rather use all ways as the candidate sets for these
      test types. This may result in a few more testcases than we would like
      (given that some `run_command` tests are insensitive to way) but this
      can be fixed by adding modifiers and we would much rather run too many
      tests than too few.
      
      This fixes #16042 and a number of other tests afflicted by the same issue.
      However, there were a few cases that required special attention:
      
       * `T14028` is currently failing and is therefore marked as broken due
         to #17300
      
       * `T-signals-child` is fragile in the `threaded1` and `threaded2` ways
         (tracked in #17307)
      b15a7fb8
  19. Jun 16, 2019
  20. Mar 22, 2019
  21. Jan 30, 2019
  22. Jun 19, 2018
  23. Apr 09, 2018
  24. Jan 02, 2018
    • Tamar Christina's avatar
      Windows: fix all failing tests. · 27b7b4db
      Tamar Christina authored and Ben Gamari's avatar Ben Gamari committed
      This makes the testsuite pass clean on Windows again.
      It also fixes the `libstdc++-6.dll` error harbormaster
      was showing.
      
      I'm marking some tests as isolated tests to reduce their
      flakiness (mostly concurrency tests) when the test system
      is under heavy load.
      
      Updates process submodule.
      
      Test Plan: ./validate
      
      Reviewers: hvr, bgamari, erikd, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4277
      27b7b4db
  25. Nov 21, 2017
    • Ben Gamari's avatar
      Revert "trees that grow" work · 314bc314
      Ben Gamari authored
      As documented in #14490, the Data instances currently blow up
      compilation time by too much to stomach. Alan will continue working on
      this in a branch and we will perhaps merge to 8.2 before 8.2.1 to avoid
      having to perform painful cherry-picks in 8.2 minor releases.
      
      Reverts haddock submodule.
      
      This reverts commit 47ad6578.
      This reverts commit e3ec2e7a.
      This reverts commit 438dd1cb.
      This reverts commit 0ff152c9.
      314bc314
  26. Nov 11, 2017
  27. Nov 08, 2017
  28. Nov 07, 2017
  29. Aug 17, 2017
    • Ryan Scott's avatar
      Remove unneeded reqlibs for mtl and parsec in the GHC testsuite · 03853475
      Ryan Scott authored
      Now that `mtl` and `parsec` are boot libraries, there's no need to
      qualify various tests in the testsuite with `reqlib('mtl')` or
      `reqlib('parsec')`.
      
      Test Plan: make test TEST="T4809 tcfail126 T4355 tc232 tc223 tc220
      tc217 tc183 T5303 DoParamM qq005 qq006 galois_raytrace T1074 mod133
      T3787 T4316 prog011 drvfail006 drvfail008"
      
      Reviewers: bgamari, austin
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3855
      03853475
  30. Jul 28, 2017
  31. Jul 03, 2017
  32. Jun 05, 2017
    • Alan Zimmerman's avatar
      Udate hsSyn AST to use Trees that Grow · 8e6ec0fa
      Alan Zimmerman authored
      Summary:
      See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow
      
      This commit prepares the ground for a full extensible AST, by replacing the type
      parameter for the hsSyn data types with a set of indices into type families,
      
          data GhcPs -- ^ Index for GHC parser output
          data GhcRn -- ^ Index for GHC renamer output
          data GhcTc -- ^ Index for GHC typechecker output
      
      These are now used instead of `RdrName`, `Name` and `Id`/`TcId`/`Var`
      
      Where the original name type is required in a polymorphic context, this is
      accessible via the IdP type family, defined as
      
          type family IdP p
          type instance IdP GhcPs = RdrName
          type instance IdP GhcRn = Name
          type instance IdP GhcTc = Id
      
      These types are declared in the new 'hsSyn/HsExtension.hs' module.
      
      To gain a better understanding of the extension mechanism, it has been applied
      to `HsLit` only, also replacing the `SourceText` fields in them with extension
      types.
      
      To preserve extension generality, a type class is introduced to capture the
      `SourceText` interface, which must be honoured by all of the extension points
      which originally had a `SourceText`.  The class is defined as
      
          class HasSourceText a where
            -- Provide setters to mimic existing constructors
            noSourceText  :: a
            sourceText    :: String -> a
      
            setSourceText :: SourceText -> a
            getSourceText :: a -> SourceText
      
      And the constraint is captured in `SourceTextX`, which is a constraint type
      listing all the extension points that make use of the class.
      
      Updating Haddock submodule to match.
      
      Test Plan: ./validate
      
      Reviewers: simonpj, shayan-najd, goldfire, austin, bgamari
      
      Subscribers: rwbarton, thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D3609
      8e6ec0fa
  33. Feb 26, 2017
    • rwbarton's avatar
      tests: remove extra_files.py (#12223) · 3415bcaa
      rwbarton authored and Ben Gamari's avatar Ben Gamari committed
      The script I used is included as testsuite/driver/kill_extra_files.py,
      though at this point it is for mostly historical interest.
      
      Some of the tests in libraries/hpc relied on extra_files.py, so this
      commit includes an update to that submodule.
      
      One test in libraries/process also relies on extra_files.py, but we
      cannot update that submodule so easily, so for now we special-case it
      in the test driver.
      3415bcaa
  34. Jan 22, 2017
  35. Jan 19, 2017
    • Richard Eisenberg's avatar
      Update levity polymorphism · e7985ed2
      Richard Eisenberg authored
      This commit implements the proposal in
      https://github.com/ghc-proposals/ghc-proposals/pull/29 and
      https://github.com/ghc-proposals/ghc-proposals/pull/35.
      
      Here are some of the pieces of that proposal:
      
      * Some of RuntimeRep's constructors have been shortened.
      
      * TupleRep and SumRep are now parameterized over a list of RuntimeReps.
      * This
      means that two types with the same kind surely have the same
      representation.
      Previously, all unboxed tuples had the same kind, and thus the fact
      above was
      false.
      
      * RepType.typePrimRep and friends now return a *list* of PrimReps. These
      functions can now work successfully on unboxed tuples. This change is
      necessary because we allow abstraction over unboxed tuple types and so
      cannot
      always handle unboxed tuples specially as we did before.
      
      * We sometimes have to create an Id from a PrimRep. I thus split PtrRep
      * into
      LiftedRep and UnliftedRep, so that the created Ids have the right
      strictness.
      
      * The RepType.RepType type was removed, as it didn't seem to help with
      * much.
      
      * The RepType.repType function is also removed, in favor of typePrimRep.
      
      * I have waffled a good deal on whether or not to keep VoidRep in
      TyCon.PrimRep. In the end, I decided to keep it there. PrimRep is *not*
      represented in RuntimeRep, and typePrimRep will never return a list
      including
      VoidRep. But it's handy to have in, e.g., ByteCodeGen and friends. I can
      imagine another design choice where we have a PrimRepV type that is
      PrimRep
      with an extra constructor. That seemed to be a heavier design, though,
      and I'm
      not sure what the benefit would be.
      
      * The last, unused vestiges of # (unliftedTypeKind) have been removed.
      
      * There were several pretty-printing bugs that this change exposed;
      * these are fixed.
      
      * We previously checked for levity polymorphism in the types of binders.
      * But we
      also must exclude levity polymorphism in function arguments. This is
      hard to check
      for, requiring a good deal of care in the desugarer. See Note [Levity
      polymorphism
      checking] in DsMonad.
      
      * In order to efficiently check for levity polymorphism in functions, it
      * was necessary
      to add a new bit of IdInfo. See Note [Levity info] in IdInfo.
      
      * It is now safe for unlifted types to be unsaturated in Core. Core Lint
      * is updated
      accordingly.
      
      * We can only know strictness after zonking, so several checks around
      * strictness
      in the type-checker (checkStrictBinds, the check for unlifted variables
      under a ~
      pattern) have been moved to the desugarer.
      
      * Along the way, I improved the treatment of unlifted vs. banged
      * bindings. See
      Note [Strict binds checks] in DsBinds and #13075.
      
      * Now that we print type-checked source, we must be careful to print
      * ConLikes correctly.
      This is facilitated by a new HsConLikeOut constructor to HsExpr.
      Particularly troublesome
      are unlifted pattern synonyms that get an extra void# argument.
      
      * Includes a submodule update for haddock, getting rid of #.
      
      * New testcases:
        typecheck/should_fail/StrictBinds
        typecheck/should_fail/T12973
        typecheck/should_run/StrictPats
        typecheck/should_run/T12809
        typecheck/should_fail/T13105
        patsyn/should_fail/UnliftedPSBind
        typecheck/should_fail/LevPolyBounded
        typecheck/should_compile/T12987
        typecheck/should_compile/T11736
      
      * Fixed tickets:
        #12809
        #12973
        #11736
        #13075
        #12987
      
      * This also adds a test case for #13105. This test case is
      * "compile_fail" and
      succeeds, because I want the testsuite to monitor the error message.
      When #13105 is fixed, the test case will compile cleanly.
      e7985ed2
  36. Dec 07, 2016
    • Alan Zimmerman's avatar
      Add HsSyn prettyprinter tests · 499e4382
      Alan Zimmerman authored
      Summary:
      Add prettyprinter tests, which take a file, parse it, pretty print it,
      re-parse the pretty printed version and then compare the original and
      new ASTs (ignoring locations)
      
      Updates haddock submodule to match the AST changes.
      
      There are three issues outstanding
      
      1. Extra parens around a context are not reproduced. This will require an
         AST change and will be done in a separate patch.
      
      2. Currently if an `HsTickPragma` is found, this is not pretty-printed,
         to prevent noise in the output.
      
         I am not sure what the desired behaviour in this case is, so have left
         it as before. Test Ppr047 is marked as expected fail for this.
      
      3. Apart from in a context, the ParsedSource AST keeps all the parens from
         the original source.  Something is happening in the renamer to remove the
         parens around visible type application, causing T12530 to fail, as the
         dumped splice decl is after the renamer.
      
         This needs to be fixed by keeping the parens, but I do not know where they
         are being removed.  I have amended the test to pass, by removing the parens
         in the expected output.
      
      Test Plan: ./validate
      
      Reviewers: goldfire, mpickering, simonpj, bgamari, austin
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: simonpj, goldfire, thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D2752
      
      GHC Trac Issues: #3384
      499e4382
  37. Feb 25, 2016
Loading