Skip to content
Snippets Groups Projects
  1. Feb 28, 2021
  2. Feb 27, 2021
  3. Feb 26, 2021
    • Andreas Klebinger's avatar
      Move absentError into ghc-prim. · a9f23793
      Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
      When using -fdicts-strict we generate references to absentError while
      compiling ghc-prim. However we always load ghc-prim before base so this
      caused linker errors.
      
      We simply solve this by moving absentError into ghc-prim. This does mean
      it's now a panic instead of an exception which can no longer be caught.
      But given that it should only be thrown if there is a compiler error
      that seems acceptable, and in fact we already do this for
      absentSumFieldError which has similar constraints.
      a9f23793
    • Matthew Pickering's avatar
      Reimplement Stream in "yoneda" style for efficiency · 24777bb3
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      'Stream' is implemented in the "yoneda" style for efficiency. By
      representing a stream in this manner 'fmap' and '>>=' operations are
      accumulated in the function parameters before being applied once when
      the stream is destroyed. In the old implementation each usage of 'mapM'
      and '>>=' would traverse the entire stream in order to apply the
      substitution at the leaves. It is well-known for free monads that this
      representation can improve performance, and the test results
      demonstrate this for GHC as well.
      
      The operation mapAccumL is not used in the compiler and can't be
      implemented efficiently because it requires destroying and rebuilding
      the stream.
      
      I removed one use of mapAccumL_ which has similar problems but the other
      use was difficult to remove. In the future it may be worth exploring
      whether the 'Stream' encoding could be modified further to capture the
      mapAccumL pattern, and likewise defer the passing of accumulation
      parameter until the stream is finally consumed.
      
      The >>= operation for 'Stream' was a hot-spot in the ticky profile for
      the "ManyConstructors" test which called the 'cg' function many times in
      "StgToCmm.hs"
      
      Metric Decrease:
          ManyConstructors
      24777bb3
    • Ryan Scott's avatar
      Fix #19363 by using pprName' {Applied,Infix} in the right places · 8d1fb46d
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      It was revealed in #19363 that the Template Haskell pretty-printer implemented
      in `Language.Haskell.TH.Ppr` did not pretty-print infix names or symbolic names
      correctly in certain situations, such as in data constructor declarations or
      fixity declarations. Easily fixed by using `pprName' Applied` (which always
      parenthesizes symbolic names in prefix position) or `pprName' Infix` (which
      always surrounds alphanumeric names with backticks in infix position) in the
      right spots.
      
      Fixes #19363.
      8d1fb46d
    • Adam Gundry's avatar
      Implement -Wambiguous-fields · 80eda911
      Adam Gundry authored and Marge Bot's avatar Marge Bot committed
      Fixes #18966. Adds a new warning -Wambiguous-fields for uses of field selectors
      or record updates that will be rejected in the future, when the DuplicateRecordFields
      extension is simplified per https://github.com/ghc-proposals/ghc-proposals/pull/366.
      80eda911
    • Simon Peyton Jones's avatar
      Update MonoLocalBinds documentation · 29e7f318
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      Update the documentation to specify that MonoLocalBinds is lifted
      by a partial type signature.
      
      This came up in #19396.
      
      [skip ci]
      29e7f318
    • Sebastian Graf's avatar
      hadrian: ticky_ghc should build all things with -ticky (#19405) [skip ci] · 98cb9402
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      With this patch, everything built by the stage1 compiler (in a
      `ticky_ghc`-transformed flavour) will be built with `-ticky`.
      
      Fixes #19405.
      98cb9402
    • utdemir's avatar
      Minor fix to QualifiedDo docs about the ApplicativeDo desugaring · bc12e7ec
      utdemir authored and Marge Bot's avatar Marge Bot committed
      When desugaring ApplicativeDo, GHC looks up the name `fmap`, not `<$>`
      (see 'GHC.Builtin.Names.fmapName'). This commit fixes the misleading
      documentation; since exporting the name `<$>` instead of `fmap` causes a
      "not in scope" error when `QualifiedDo` and `ApplicativeDo` is combined.
      
      [skip ci]
      bc12e7ec
  4. Feb 24, 2021
  5. Feb 23, 2021
  6. Feb 22, 2021
Loading