Skip to content
Snippets Groups Projects
  1. Jun 05, 2021
    • Moritz Angermann's avatar
      Adds AArch64 Native Code Generator · 3b1aa7db
      Moritz Angermann authored and Marge Bot's avatar Marge Bot committed
      In which we add a new code generator to the Glasgow Haskell
      Compiler. This codegen supports ELF and Mach-O targets, thus covering
      Linux, macOS, and BSDs in principle.  It was tested only on macOS and
      Linux.  The NCG follows a similar structure as the other native code
      generators we already have, and should therfore be realtively easy to
      follow.
      
      It supports most of the features required for a proper native code
      generator, but does not claim to be perfect or fully optimised.  There
      are still opportunities for optimisations.
      
      Metric Decrease:
          ManyAlternatives
          ManyConstructors
          MultiLayerModules
          PmSeriesG
          PmSeriesS
          PmSeriesT
          PmSeriesV
          T10421
          T10421a
          T10858
          T11195
          T11276
          T11303b
          T11374
          T11822
          T12227
          T12545
          T12707
          T13035
          T13253
          T13253-spj
          T13379
          T13701
          T13719
          T14683
          T14697
          T15164
          T15630
          T16577
          T17096
          T17516
          T17836
          T17836b
          T17977
          T17977b
          T18140
          T18282
          T18304
          T18478
          T18698a
          T18698b
          T18923
          T1969
          T3064
          T5030
          T5321FD
          T5321Fun
          T5631
          T5642
          T5837
          T783
          T9198
          T9233
          T9630
          T9872d
          T9961
          WWRec
      Metric Increase:
          T4801
      3b1aa7db
    • Richard Eisenberg's avatar
      Fix #19682 by breaking cycles in Deriveds · 8c90e6c7
      Richard Eisenberg authored and Marge Bot's avatar Marge Bot committed
      This commit expands the old Note [Type variable cycles in Givens] to apply
      as well to Deriveds. See the Note for details and examples. This fixes a
      regression introduced by my earlier commit that killed off the flattener in
      favor of the rewriter.
      
      A few other things happened along the way:
      
      * unifyTest was renamed to touchabilityTest, because that's what it does.
      
      * isInsolubleOccursCheck was folded into checkTypeEq, which does much of the
        same work. To get this to work out, though, we need to keep more careful
        track of what errors we spot in checkTypeEq, and so CheckTyEqResult has
        become rather more glorious.
      
      * A redundant Note or two was eliminated.
      
      * Kill off occCheckForErrors; due to Note [Rewriting synonyms], the
        extra occCheckExpand here is always redundant.
      
      * Store blocked equalities separately from other inerts; less stuff
        to look through when kicking out.
      
      Close #19682.
      
      test case: typecheck/should_compile/T19682{,b}
      8c90e6c7
    • Sylvain Henry's avatar
      Put Unique related global variables in the RTS (#19940) · 9a28680d
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      9a28680d
    • Shayne Fletcher's avatar
      Make 'count-deps' a ghc/util standalone program · 1713cbb0
      Shayne Fletcher authored and Marge Bot's avatar Marge Bot committed
      - Move 'count-deps' into 'ghc/utils' so that it can be called standalone.
      - Move 'testsuite/tests/parser/should_run/' tests 'CountParserDeps' and
      'CountAstDeps' to 'testsuite/tests/count-deps' and reimplement in terms
      of calling the utility
      - Document how to use 'count-deps' in 'ghc/utils/count-deps/README'
      1713cbb0
  2. Jun 04, 2021
  3. Jun 03, 2021
    • Roland Senn's avatar
      Follow up #12449: Improve function `Inspect.hs:check2` · 7a05185a
      Roland Senn authored and Marge Bot's avatar Marge Bot committed
      * Add a Note to clarify RttiTypes.
      * Don't call `quantifyType` at all the call sites of `check2`.
      * Simplyfy arguments of functions `Inspect.hs:check1` and `Inspect.hs:check2`.
        - `check1` only uses the two lists of type variables, but not the types.
        - `check2` only uses the two types, but not the lists of type variables.
      * In `Inspect.hs:check2` send only the tau part of the type to `tcSplitTyConApp_maybe`.
      7a05185a
    • Alfredo Di Napoli's avatar
      Port HsToCore messages to new infrastructure · d5b89ed4
      Alfredo Di Napoli authored and Marge Bot's avatar Marge Bot committed
      This commit converts a bunch of HsToCore (Ds) messages to use the new
      GHC's diagnostic message infrastructure. In particular the DsMessage
      type has been expanded with a lot of type constructors, each
      encapsulating a particular error and warning emitted during desugaring.
      
      Due to the fact that levity polymorphism checking can happen both at the
      Ds and at the TcRn level, a new `TcLevityCheckDsMessage` constructor has
      been added to the `TcRnMessage` type.
      d5b89ed4
    • Matthew Pickering's avatar
      Driver Rework Patch · 25977ab5
      Matthew Pickering authored
      This patch comprises of four different but closely related ideas. The
      net result is fixing a large number of open issues with the driver
      whilst making it simpler to understand.
      
      1. Use the hash of the source file to determine whether the source file
      has changed or not. This makes the recompilation checking more robust to
      modern build systems which are liable to copy files around changing
      their modification times.
      
      2. Remove the concept of a "stable module", a stable module was one
      where the object file was older than the source file, and all transitive
      dependencies were also stable. Now we don't rely on the modification
      time of the source file, the notion of stability is moot.
      
      3. Fix TH/plugin recompilation after the removal of stable modules. The
      TH recompilation check used to rely on stable modules. Now there is a
      uniform and simple way, we directly track the linkables which were
      loaded into the interpreter whilst compiling a module. This is an
      over-approximation but more robust wrt package dependencies changing.
      
      4. Fix recompilation checking for dynamic object files. Now we actually
      check if the dynamic object file exists when compiling with -dynamic-too
      
      Fixes #19774 #19771 #19758 #17434 #11556 #9121 #8211 #16495 #7277 #16093
      25977ab5
    • Shayne Fletcher's avatar
      CountDeps: print graph of module dependencies in dot format · 79d12d34
      Shayne Fletcher authored and Marge Bot's avatar Marge Bot committed
      The tests `CountParserDeps.hs` and `CountAstDeps.hs` are implemented
      by calling `CountDeps`. In this MR, `CountDeps.printDeps` is updated
      such tat by uncommenting a line, you can print a module's dependency
      graph showing what includes what. The output is in a format suitable
      for use with graphviz.
      79d12d34
    • Sebastian Graf's avatar
      WW: Mark absent errors as diverging again · b585aff0
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      As the now historic part of `NOTE [aBSENT_ERROR_ID]` explains, we used to have
      `exprIsHNF` respond True to `absentError` and give it a non-bottoming demand
      signature, in order to perform case-to-let on certain `case`s we used to emit
      that scrutinised `absentError` (Urgh).
      
      What changed, why don't we emit these questionable absent errors anymore?
      The absent errors in question filled in for binders that would end up in
      strict fields after being seq'd. Apparently, the old strictness analyser would
      give these binders an absent demand, but today we give them head-strict demand
      `1A` and thus don't replace with absent errors at all.
      
      This fixes items (1) and (2) of #19853.
      b585aff0
  4. Jun 02, 2021
    • Matthew Pickering's avatar
      Fix infinite looping in hptSomeModulesBelow · b66cf8ad
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      When compiling Agda we entered into an infinite loop as the stopping
      condition was a bit wrong in hptSomeModulesBelow.
      
      The bad situation was something like
      
      * We would see module A (NotBoot) and follow it dependencies
      * Later on we would encounter A (Boot) and follow it's dependencies,
        because the lookup would not match A (NotBoot) and A (IsBoot)
      * Somewhere in A (Boot)s dependencies, A (Boot) would appear again and
        lead us into an infinite loop.
      
      Now the state marks whether we have been both variants (IsBoot and
      NotBoot) so we don't follow dependencies for A (Boot) many times.
      b66cf8ad
    • Matthew Pickering's avatar
      CI: Don't explicitly build hadrian before using run_hadrian · 852a12c8
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This causes hadrian to be built twice because the second time uses a
      different index state.
      852a12c8
    • Matthew Pickering's avatar
      Run both lint jobs together · de33143c
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      de33143c
    • Matthew Pickering's avatar
      hadrian: Speed up lint:base rule · 437a6ccd
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      The rule before decided to build the whole stage1 compiler, but this was
      unecessary as we were just missing one header file which can be
      generated directly by calling configure.
      
      Before: 18 minutes
      After: 54s
      437a6ccd
    • Vladislav Zavialov's avatar
      Disallow linear arrows in GADT records (#19928) · 7d8e1549
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      Before this patch, GHC used to silently accept programs such as the
      following:
      
      	data R where
      	  D1 :: { d1 :: Int } %1 -> R
      
      The %1 annotation was completely ignored. Now it is a proper error.
      
      One remaining issue is that in the error message (⊸) turns
      into (%1 ->). This is to be corrected with upcoming exactprint updates.
      7d8e1549
    • Divam Narula's avatar
      Specify the reason for import for the backpack's extra imports · c5a9e32e
      Divam Narula authored and Marge Bot's avatar Marge Bot committed
      c5a9e32e
    • Zubin's avatar
      Fail before checking instances in checkHsigIface if exports don't match (#19244) · adddf248
      Zubin authored and Marge Bot's avatar Marge Bot committed
      adddf248
    • Roland Senn's avatar
      Allow primops in a :print (and friends) command. Fix #19394 · fcd124d5
      Roland Senn authored and Marge Bot's avatar Marge Bot committed
      * For primops from `GHC.Prim` lookup the HValues in `GHC.PrimopWrappers`.
      * Add short error messages if a user tries to use a *Non-Id* value or a
        `pseudoop` in a `:print`, `:sprint` or `force`command.
      * Add additional test cases for `Magic Ids`.
      fcd124d5
    • vdukhovni's avatar
      Improve wording of fold[lr]M documentation. · 6b6c4b9a
      vdukhovni authored and Marge Bot's avatar Marge Bot committed
      The sequencing of monadic effects in foldlM and foldrM was described as
      respectively right-associative and left-associative, but this could be
      confusing, as in essence we're just composing Kleisli arrows, whose
      composition is simply associative.
      
      What matters therefore is the order of sequencing of effects, which
      can be described more clearly without dragging in associativity as
      such.
      
      This avoids describing these folds as being both left-to-right and
      right-to-left depending on whether we're tracking effects or operator
      application.  The new text should be easier to understand.
      6b6c4b9a
  5. May 29, 2021
  6. May 28, 2021
  7. May 27, 2021
    • Alan Zimmerman's avatar
      [EPA] exact print linear arrows. · 6de8ac89
      Alan Zimmerman authored
      Closes #19903
      
      Note: the normal ppr does not reproduce unicode linear arrows, so that
      part of the normal printing test is ommented out in the Makefile for
      this test. See #18846
      6de8ac89
Loading