From ben at well-typed.com Fri Jan 13 23:01:19 2023 From: ben at well-typed.com (Ben Gamari) Date: Fri, 13 Jan 2023 18:01:19 -0500 Subject: [ANNOUNCE] GHC 9.6.1-alpha1 is now available Message-ID: <87r0vyt4yd.fsf@smart-cactus.org> The GHC team is very pleased to announce the availability of GHC 9.6.1-alpha1. As usual, binaries and source distributions are available at downloads.haskell.org: https://downloads.haskell.org/ghc/9.6.1-alpha1/ This is the first alpha release in the 9.6 series which will bring a number of exciting features: * A new Javascript code generation backend * A new WebAssembly code generation backend, * Significant latency improvements in the non-moving garbage collector * Support for loading of multiple components in GHCi * Efficient support for delimited continuations * Improvements in error messages * Numerous improvements in compiler-residency Note that both the Javascript and WebAssembly backends are still in a state of infancy and are present in this release as a technology preview; we hope that they will mature considerably before the final 9.6.1 release. Please give this release a try and open a [ticket] if you see anything amiss. Cheers, - Ben [ticket]: https://gitlab.haskell.org/ghc/ghc/issues/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From george.colpitts at gmail.com Sat Jan 14 12:51:54 2023 From: george.colpitts at gmail.com (George Colpitts) Date: Sat, 14 Jan 2023 08:51:54 -0400 Subject: [ANNOUNCE] GHC 9.6.1-alpha1 is now available In-Reply-To: <87r0vyt4yd.fsf@smart-cactus.org> References: <87r0vyt4yd.fsf@smart-cactus.org> Message-ID: Hi I believe llvm does not work in this alpha as 21936 is still open. Is that correct? I also believe that when it does work it will require llvm 15 which will be incompatible with earlier versions of ghc. Is that correct? Thanks George On Fri, Jan 13, 2023 at 7:02 PM Ben Gamari wrote: > > The GHC team is very pleased to announce the availability of GHC > 9.6.1-alpha1. As usual, binaries and source distributions are available > at downloads.haskell.org: > > https://downloads.haskell.org/ghc/9.6.1-alpha1/ > > This is the first alpha release in the 9.6 series which will bring a > number of exciting features: > > * A new Javascript code generation backend > > * A new WebAssembly code generation backend, > > * Significant latency improvements in the non-moving garbage collector > > * Support for loading of multiple components in GHCi > > * Efficient support for delimited continuations > > * Improvements in error messages > > * Numerous improvements in compiler-residency > > Note that both the Javascript and WebAssembly backends are still in a > state of infancy and are present in this release as a technology > preview; we hope that they will mature considerably before the final > 9.6.1 release. > > Please give this release a try and open a [ticket] if you see anything > amiss. > > Cheers, > > - Ben > > > [ticket]: https://gitlab.haskell.org/ghc/ghc/issues/ > > _______________________________________________ > Glasgow-haskell-users mailing list > Glasgow-haskell-users at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From george.colpitts at gmail.com Sun Jan 15 17:01:49 2023 From: george.colpitts at gmail.com (George Colpitts) Date: Sun, 15 Jan 2023 13:01:49 -0400 Subject: [ANNOUNCE] GHC 9.6.1-alpha1 is now available In-Reply-To: References: <87r0vyt4yd.fsf@smart-cactus.org> Message-ID: my original email corrected below On Sat, Jan 14, 2023 at 8:51 AM George Colpitts wrote: > Hi > > I believe llvm 15 does not work in this alpha as 21936 is still open. Is > that correct? > > I also believe that when it does work ghc 9.6 will not be compatible with > earlier versions of llvm 15. Is that correct? > > Thanks > George > > > > > On Fri, Jan 13, 2023 at 7:02 PM Ben Gamari wrote: > >> >> The GHC team is very pleased to announce the availability of GHC >> 9.6.1-alpha1. As usual, binaries and source distributions are available >> at downloads.haskell.org: >> >> https://downloads.haskell.org/ghc/9.6.1-alpha1/ >> >> This is the first alpha release in the 9.6 series which will bring a >> number of exciting features: >> >> * A new Javascript code generation backend >> >> * A new WebAssembly code generation backend, >> >> * Significant latency improvements in the non-moving garbage collector >> >> * Support for loading of multiple components in GHCi >> >> * Efficient support for delimited continuations >> >> * Improvements in error messages >> >> * Numerous improvements in compiler-residency >> >> Note that both the Javascript and WebAssembly backends are still in a >> state of infancy and are present in this release as a technology >> preview; we hope that they will mature considerably before the final >> 9.6.1 release. >> >> Please give this release a try and open a [ticket] if you see anything >> amiss. >> >> Cheers, >> >> - Ben >> >> >> [ticket]: https://gitlab.haskell.org/ghc/ghc/issues/ >> >> _______________________________________________ >> Glasgow-haskell-users mailing list >> Glasgow-haskell-users at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From george.colpitts at gmail.com Sun Jan 15 17:02:31 2023 From: george.colpitts at gmail.com (George Colpitts) Date: Sun, 15 Jan 2023 13:02:31 -0400 Subject: [ANNOUNCE] GHC 9.6.1-alpha1 is now available In-Reply-To: References: <87r0vyt4yd.fsf@smart-cactus.org> Message-ID: On Sun, Jan 15, 2023 at 1:01 PM George Colpitts wrote: > my original email corrected below > > On Sat, Jan 14, 2023 at 8:51 AM George Colpitts > wrote: > >> Hi >> >> I believe llvm 15 does not work in this alpha as 21936 is still open. Is >> that correct? >> >> I also believe that when it does work ghc 9.6 will not be compatible >> with earlier versions of llvm. Is that correct? >> >> Thanks >> George >> >> >> >> >> On Fri, Jan 13, 2023 at 7:02 PM Ben Gamari wrote: >> >>> >>> The GHC team is very pleased to announce the availability of GHC >>> 9.6.1-alpha1. As usual, binaries and source distributions are available >>> at downloads.haskell.org: >>> >>> https://downloads.haskell.org/ghc/9.6.1-alpha1/ >>> >>> This is the first alpha release in the 9.6 series which will bring a >>> number of exciting features: >>> >>> * A new Javascript code generation backend >>> >>> * A new WebAssembly code generation backend, >>> >>> * Significant latency improvements in the non-moving garbage collector >>> >>> * Support for loading of multiple components in GHCi >>> >>> * Efficient support for delimited continuations >>> >>> * Improvements in error messages >>> >>> * Numerous improvements in compiler-residency >>> >>> Note that both the Javascript and WebAssembly backends are still in a >>> state of infancy and are present in this release as a technology >>> preview; we hope that they will mature considerably before the final >>> 9.6.1 release. >>> >>> Please give this release a try and open a [ticket] if you see anything >>> amiss. >>> >>> Cheers, >>> >>> - Ben >>> >>> >>> [ticket]: https://gitlab.haskell.org/ghc/ghc/issues/ >>> >>> _______________________________________________ >>> Glasgow-haskell-users mailing list >>> Glasgow-haskell-users at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at well-typed.com Mon Jan 16 14:02:21 2023 From: ben at well-typed.com (Ben Gamari) Date: Mon, 16 Jan 2023 09:02:21 -0500 Subject: [ANNOUNCE] GHC 9.6.1-alpha1 is now available In-Reply-To: References: <87r0vyt4yd.fsf@smart-cactus.org> Message-ID: <87lem2tw6g.fsf@smart-cactus.org> George Colpitts writes: > Hi > > I believe llvm does not work in this alpha as 21936 is still open. Is that > correct? > Indeed we do not yet support LLVM 15 but all previous LLVM versions continue to work. We can try to fix this for the final release. > I also believe that when it does work it will require llvm 15 which will be > incompatible with earlier versions of ghc. Is that correct? > Early indications suggest that supporting LLVM 15 will require that we raise the minimum supported version to LLVM 13. Cheers, - Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From sperber at deinprogramm.de Fri Jan 20 09:35:36 2023 From: sperber at deinprogramm.de (Michael Sperber) Date: Fri, 20 Jan 2023 10:35:36 +0100 Subject: How to fool the divergence checker in ghc 9 Message-ID: I'm trying to port Conal Elliott's ConCat plugin from ghc 8 to 9, and the divergence checker foils me. Background: The plugin works by transforming calls to a pseudo-function toCcc' defined like so: -- | Pseudo function to trigger rewriting to TOCCC form. toCcc' :: forall k a b. (a -> b) -> (a `k` b) toCcc' _ = oops "toCcc' called" {-# NOINLINE toCcc' #-} For ghc 8, oops was defined like so: module ConCat.Misc where -- | Pseudo function to fool GHC's divergence checker. oops :: String -> b oops str = errorWithStackTrace ("Oops: "++str) {-# NOINLINE oops #-} ... but unfortunately, ghc 9 is not so easily fooled and reports x for toCcc'. Is there any way to prevent this that works for ghc 9? Help would be much appreciated! -- Regards, Mike From david.feuer at gmail.com Fri Jan 20 09:43:57 2023 From: david.feuer at gmail.com (David Feuer) Date: Fri, 20 Jan 2023 04:43:57 -0500 Subject: How to fool the divergence checker in ghc 9 In-Reply-To: References: Message-ID: I don't know what all that means exactly (especially since GHC's demand signatures have changed recently in a way I don't understand at all). But for hiding divergence, one option is to use a module with demand analysis disabled. Try {-# options_ghc -fno-strictness #-}. You'll likely need to put oops in its own module to avoid interfering with desired optimizations. On Fri, Jan 20, 2023, 4:36 AM Michael Sperber wrote: > > I'm trying to port Conal Elliott's ConCat plugin from ghc 8 to 9, and > the divergence checker foils me. > > Background: The plugin works by transforming calls to a pseudo-function > toCcc' defined like so: > > -- | Pseudo function to trigger rewriting to TOCCC form. > toCcc' :: forall k a b. (a -> b) -> (a `k` b) > toCcc' _ = oops "toCcc' called" > {-# NOINLINE toCcc' #-} > > For ghc 8, oops was defined like so: > > module ConCat.Misc where > > -- | Pseudo function to fool GHC's divergence checker. > oops :: String -> b > oops str = errorWithStackTrace ("Oops: "++str) > {-# NOINLINE oops #-} > > ... but unfortunately, ghc 9 is not so easily fooled and reports x > for toCcc'. Is there any way to prevent this that works for ghc 9? > > Help would be much appreciated! > > -- > Regards, > Mike > _______________________________________________ > Glasgow-haskell-users mailing list > Glasgow-haskell-users at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sperber at deinprogramm.de Fri Jan 20 10:17:49 2023 From: sperber at deinprogramm.de (Michael Sperber) Date: Fri, 20 Jan 2023 11:17:49 +0100 Subject: How to fool the divergence checker in ghc 9 In-Reply-To: (David Feuer's message of "Fri, 20 Jan 2023 04:43:57 -0500") References: Message-ID: On Fri, Jan 20 2023, David Feuer wrote: > I don't know what all that means exactly (especially since GHC's demand > signatures have changed recently in a way I don't understand at all). But > for hiding divergence, one option is to use a module with demand analysis > disabled. Try {-# options_ghc -fno-strictness #-}. You'll likely need to > put oops in its own module to avoid interfering with desired optimizations. THanks for the suggestion! So I did this: {-# options_ghc -fno-strictness #-} module ConCat.Oops(oops) where import GHC.Stack (errorWithStackTrace) -- for oops -- | Pseudo function to fool GHC's divergence checker. oops :: String -> b oops str = errorWithStackTrace ("Oops: "++str) {-# NOINLINE oops #-} ... but am getting the same result from the divergence checker, sadly ... -- Regards, Mike From david.feuer at gmail.com Fri Jan 20 10:26:52 2023 From: david.feuer at gmail.com (David Feuer) Date: Fri, 20 Jan 2023 05:26:52 -0500 Subject: How to fool the divergence checker in ghc 9 In-Reply-To: References: Message-ID: What if you go with the big hammer for that module: -O0? My main concern about that is that you won't get arity analysis. There may be some more -f flags I've missed... On Fri, Jan 20, 2023, 5:17 AM Michael Sperber wrote: > > On Fri, Jan 20 2023, David Feuer wrote: > > > I don't know what all that means exactly (especially since GHC's demand > > signatures have changed recently in a way I don't understand at all). But > > for hiding divergence, one option is to use a module with demand analysis > > disabled. Try {-# options_ghc -fno-strictness #-}. You'll likely need to > > put oops in its own module to avoid interfering with desired > optimizations. > > THanks for the suggestion! > > So I did this: > > {-# options_ghc -fno-strictness #-} > module ConCat.Oops(oops) where > > import GHC.Stack (errorWithStackTrace) -- for oops > > -- | Pseudo function to fool GHC's divergence checker. > oops :: String -> b > oops str = errorWithStackTrace ("Oops: "++str) > {-# NOINLINE oops #-} > > ... but am getting the same result from the divergence checker, sadly ... > > -- > Regards, > Mike > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.feuer at gmail.com Fri Jan 20 10:27:51 2023 From: david.feuer at gmail.com (David Feuer) Date: Fri, 20 Jan 2023 05:27:51 -0500 Subject: How to fool the divergence checker in ghc 9 In-Reply-To: References: Message-ID: Actually, getting that arity probably isn't important anyway.... Try O0. On Fri, Jan 20, 2023, 5:26 AM David Feuer wrote: > What if you go with the big hammer for that module: -O0? My main concern > about that is that you won't get arity analysis. There may be some more -f > flags I've missed... > > On Fri, Jan 20, 2023, 5:17 AM Michael Sperber > wrote: > >> >> On Fri, Jan 20 2023, David Feuer wrote: >> >> > I don't know what all that means exactly (especially since GHC's demand >> > signatures have changed recently in a way I don't understand at all). >> But >> > for hiding divergence, one option is to use a module with demand >> analysis >> > disabled. Try {-# options_ghc -fno-strictness #-}. You'll likely need to >> > put oops in its own module to avoid interfering with desired >> optimizations. >> >> THanks for the suggestion! >> >> So I did this: >> >> {-# options_ghc -fno-strictness #-} >> module ConCat.Oops(oops) where >> >> import GHC.Stack (errorWithStackTrace) -- for oops >> >> -- | Pseudo function to fool GHC's divergence checker. >> oops :: String -> b >> oops str = errorWithStackTrace ("Oops: "++str) >> {-# NOINLINE oops #-} >> >> ... but am getting the same result from the divergence checker, sadly ... >> >> -- >> Regards, >> Mike >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sperber at deinprogramm.de Fri Jan 20 10:31:46 2023 From: sperber at deinprogramm.de (Michael Sperber) Date: Fri, 20 Jan 2023 11:31:46 +0100 Subject: How to fool the divergence checker in ghc 9 In-Reply-To: (David Feuer's message of "Fri, 20 Jan 2023 05:27:51 -0500") References: Message-ID: On Fri, Jan 20 2023, David Feuer wrote: > Actually, getting that arity probably isn't important anyway.... Try O0. Ah, that worked. Many thanks! -- Regards, Mike From ben at well-typed.com Mon Jan 30 18:21:32 2023 From: ben at well-typed.com (Ben Gamari) Date: Mon, 30 Jan 2023 13:21:32 -0500 Subject: [ANNOUNCE] GHC 9.6.1-alpha2 is now available Message-ID: <87a61zriif.fsf@smart-cactus.org> The GHC team is very pleased to announce the availability of GHC 9.6.1-alpha2. As usual, binaries and source distributions are available at downloads.haskell.org: https://downloads.haskell.org/ghc/9.6.1-alpha2/ Beginning with GHC 9.6.1, GHC can be built as a cross-compiler to WebAssembly and JavaScript. This is an important step towards robust support for compiling Haskell to the Web, but there are a few caveats to be aware of in the 9.6 series: - Both the Javascript and WebAssembly backends are still at an early stage of development and are present in this release as a technology preview - Using GHC as a cross-compiler is not as easy as we would like it to be; in particular, there are challenges related to Template Haskell. - GHC is not yet run-time retargetable; a given GHC binary targets exactly one platform, and both WebAssembly and JavaScript are considered platforms for this purpose. Cross-compilers must be built from source by their users We hope to lift all of these limitations in future releases. Additionally, 9.6.1 will include: - Significant latency improvements in the non-moving garbage collector - Efficient runtime support for delimited continuations - Improvements in compiler error messages - Numerous improvements in the compiler's memory usage See the [release notes] for a comprehensive accounting of changes in this release. As always, one can find a [migration guide] to aid in transitioning from older releases on the GHC Wiki. We have also recently started extending our release process to cover a wider set of Linux distributions. In particular, we now offer Rocky 8 and Ubuntu 20.04 binary distributions which cover RedHat-derivative and distributions using older `glibc` releases (namely 2.27), respectively. Please do give this release a try and open a [ticket] if you see anything amiss. Cheers, - Ben [ticket]: https://gitlab.haskell.org/ghc/ghc/issues/ [migration-guide]: https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.6 [release notes]: https://downloads.haskell.org/ghc/9.6.1-alpha2/docs/users_guide/9.6.1-notes.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: