Build GHC in GHC2021
Oleg Grenrus
oleg.grenrus at iki.fi
Fri Dec 8 17:35:55 UTC 2023
I think Arnaud was talkin about ghc, i.e. compiler/, not about
everything (incl libraries/base e.g.).
I tried, the PoC is at
https://gitlab.haskell.org/ghc/ghc/-/merge_requests/11743
I needed to do `NoPolyKinds` in few modules (could give kind signature
too, but NoPolyKinds were quicker).
Especially that hits hs-boot files.
By doing `default-language: GHC2021`, and going through modules with
BangPatterns (and removing that, and other GHC2021 extensions), the diff
stats are nice: 91 files changed, 24 insertions(+), 272 deletions(-)
- Oleg
On 8.12.2023 13.33, Andreas Klebinger via ghc-devs wrote:
>
> On a whim tried enabling it by default but it failed first because
> GeneralizedNewtypeDeriving is incompatible with safe haskell
> and once I disabled GeneralizedNewtypeDeriving it failed with some
> error about missmatched kinds.
>
> I would welcome a patch doing this, but it's not a priority.
> Especially since it doesn't seem to be as simple as changing
> the base language and removing some pragmas.
>
> Am 07/12/2023 um 14:29 schrieb Arnaud Spiwack:
>> Indeed. I didn't realise the ambiguity in my wording.
>>
>> I'd like for GHC to be built, with Hadrian, using GHC2021 as the base
>> language.
>>
>>
>> On Thu, 7 Dec 2023 at 14:01, Tom Ellis
>> <tom-lists-haskell-cafe-2023 at jaguarpaw.co.uk> wrote:
>>
>> On Thu, Dec 07, 2023 at 12:53:02PM +0000, Richard Eisenberg wrote:
>> > I think this is an excellent idea! So excellent, that we've
>> already done it. :)
>> >
>> > When I try to compile with GHC 9.6.2 (what I have lying
>> around), GHC2021 is in effect.
>> >
>> > Is there something different you were thinking of?
>>
>> I think Arnaud meant that compilations of GHC's codebase itself
>> should
>> use the GHC2021 setting.
>> _______________________________________________
>> ghc-devs mailing list
>> ghc-devs at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>>
>>
>>
>> --
>> Arnaud Spiwack
>> Director, Research at https://moduscreate.com and https://tweag.io.
>>
>> _______________________________________________
>> ghc-devs mailing list
>> ghc-devs at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20231208/a9dd9c9b/attachment.html>
More information about the ghc-devs
mailing list