[Git][ghc/ghc][wip/semigroup-sdoc] Use Semigroup's (<>) for Doc/SDoc

Vladislav Zavialov gitlab at gitlab.haskell.org
Mon Apr 13 15:51:27 UTC 2020



Vladislav Zavialov pushed to branch wip/semigroup-sdoc at Glasgow Haskell Compiler / GHC


Commits:
e4cf1c5d by Vladislav Zavialov at 2020-04-13T18:51:18+03:00
Use Semigroup's (<>) for Doc/SDoc

Before this patch, Outputable.hs defined its own (<>) which caused
conflicts with (Data.Semigroup.<>) and thus led to inconvenience.

However, replacing it is not trivial due to a different fixity:

  http://www.haskell.org/pipermail/libraries/2011-November/017066.html

Nevertheless, it is possible to update the pretty-printing code to work
with (<>) of a different fixitiy, and that's what this patch implements.

Now Doc and SDoc are instances of Semigroup.

- - - - -


30 changed files:

- compiler/GHC/CmmToAsm/PPC/RegInfo.hs
- compiler/GHC/Driver/Plugins.hs
- compiler/GHC/Hs/Doc.hs
- compiler/GHC/HsToCore/Docs.hs
- compiler/GHC/HsToCore/PmCheck/Oracle.hs
- compiler/GHC/HsToCore/PmCheck/Types.hs
- compiler/GHC/Iface/Ext/Types.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Hole.hs
- compiler/GHC/Tc/Errors/Hole/FitTypes.hs
- compiler/GHC/Tc/Gen/Annotation.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Instance/Family.hs
- compiler/GHC/Tc/Instance/FunDeps.hs
- compiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Utils/TcMType.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/Types/Basic.hs
- compiler/GHC/Types/Unique/FM.hs
- compiler/GHC/Types/Var/Set.hs
- compiler/main/Ar.hs
- compiler/parser/RdrHsSyn.hs
- compiler/utils/GhcPrelude.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e4cf1c5db6135dec71929358f9012d385a7441c1

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e4cf1c5db6135dec71929358f9012d385a7441c1
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200413/19268590/attachment.html>


More information about the ghc-commits mailing list