From conal at conal.net Fri Aug 3 01:25:05 2018 From: conal at conal.net (Conal Elliott) Date: Thu, 2 Aug 2018 18:25:05 -0700 Subject: Constructor as outermost match in RULE under GHC 8.2.2 & 8.4.3 Message-ID: GHC 8.2.2 and 8.4.3 dislike the following rules: ``` haskell {-# RULES "pair fst snd" forall p. (,) (exl p) (exr p) = p "swap" forall p. (,) (exr p) (exl p) = swap p #-} ``` Error messages: ``` haskell /Users/conal/Haskell/concat/plugin/src/ConCat/Rebox.hs:485:1: warning: A constructor, (,), appears as outermost match in RULE lhs. This rule will be ignored. | 485 | "pair fst snd" forall p. (,) (exl p) (exr p) = p | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /Users/conal/Haskell/concat/plugin/src/ConCat/Rebox.hs:489:1: warning: A constructor, (,), appears as outermost match in RULE lhs. This rule will be ignored. | 489 | "swap" forall p. (,) (exr p) (exl p) = swap p | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` GHC 8.0.2 didn't complain about these rules, though I'm unsure whether they worked as desired. Why disallow such rules (with constructors at the head)? -- Conal -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at smart-cactus.org Fri Aug 3 19:48:13 2018 From: ben at smart-cactus.org (Ben Gamari) Date: Fri, 03 Aug 2018 15:48:13 -0400 Subject: Constructor as outermost match in RULE under GHC 8.2.2 & 8.4.3 In-Reply-To: References: Message-ID: <7F604D68-0776-447A-8F93-53BE2CCB88C6@smart-cactus.org> On August 2, 2018 9:25:05 PM EDT, Conal Elliott wrote: >GHC 8.2.2 and 8.4.3 dislike the following rules: > >``` haskell >{-# RULES > >"pair fst snd" forall p. (,) (exl p) (exr p) = p > >"swap" forall p. (,) (exr p) (exl p) = swap p > > #-} >``` > >Error messages: > >``` haskell >/Users/conal/Haskell/concat/plugin/src/ConCat/Rebox.hs:485:1: warning: > A constructor, (,), appears as outermost match in RULE lhs. > This rule will be ignored. > | >485 | "pair fst snd" forall p. (,) (exl p) (exr p) = p > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > >/Users/conal/Haskell/concat/plugin/src/ConCat/Rebox.hs:489:1: warning: > A constructor, (,), appears as outermost match in RULE lhs. > This rule will be ignored. > | >489 | "swap" forall p. (,) (exr p) (exl p) = swap p > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >``` > >GHC 8.0.2 didn't complain about these rules, though I'm unsure whether >they >worked as desired. > >Why disallow such rules (with constructors at the head)? > >-- Conal While we only started warning about them recently, previously the rules almost certainly weren't firing as you expected them to. The trouble is that constructors are often replaced with their wrappers rather early in simplification. This meant that matching on constructors in rules was quite unreliable. This is discussed in #13290. Cheers, - Ben From conal at conal.net Fri Aug 3 19:50:31 2018 From: conal at conal.net (Conal Elliott) Date: Fri, 3 Aug 2018 12:50:31 -0700 Subject: Constructor as outermost match in RULE under GHC 8.2.2 & 8.4.3 In-Reply-To: <7F604D68-0776-447A-8F93-53BE2CCB88C6@smart-cactus.org> References: <7F604D68-0776-447A-8F93-53BE2CCB88C6@smart-cactus.org> Message-ID: I get it. Thanks, Ben! On Fri, Aug 3, 2018 at 12:48 PM, Ben Gamari wrote: > On August 2, 2018 9:25:05 PM EDT, Conal Elliott wrote: > >GHC 8.2.2 and 8.4.3 dislike the following rules: > > > >``` haskell > >{-# RULES > > > >"pair fst snd" forall p. (,) (exl p) (exr p) = p > > > >"swap" forall p. (,) (exr p) (exl p) = swap p > > > > #-} > >``` > > > >Error messages: > > > >``` haskell > >/Users/conal/Haskell/concat/plugin/src/ConCat/Rebox.hs:485:1: warning: > > A constructor, (,), appears as outermost match in RULE lhs. > > This rule will be ignored. > > | > >485 | "pair fst snd" forall p. (,) (exl p) (exr p) = p > > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > >/Users/conal/Haskell/concat/plugin/src/ConCat/Rebox.hs:489:1: warning: > > A constructor, (,), appears as outermost match in RULE lhs. > > This rule will be ignored. > > | > >489 | "swap" forall p. (,) (exr p) (exl p) = swap p > > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > >``` > > > >GHC 8.0.2 didn't complain about these rules, though I'm unsure whether > >they > >worked as desired. > > > >Why disallow such rules (with constructors at the head)? > > > >-- Conal > > While we only started warning about them recently, previously the rules > almost certainly weren't firing as you expected them to. The trouble is > that constructors are often replaced with their wrappers rather early in > simplification. This meant that matching on constructors in rules was quite > unreliable. This is discussed in #13290. > > Cheers, > > - Ben > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at well-typed.com Sat Aug 11 02:31:04 2018 From: ben at well-typed.com (Ben Gamari) Date: Fri, 10 Aug 2018 22:31:04 -0400 Subject: [ANNOUNCE] GHC 8.6.1-beta1 available Message-ID: <87y3ddprbw.fsf@smart-cactus.org> Hello everyone, The GHC development team is very pleased to announce the first beta leading up to GHC 8.6.1 release. The usual release artifacts are available from https://downloads.haskell.org/~ghc/8.6.1-beta1 This beta fixes most of the bugs reported in the first two alphas and brings all of the core libraries up to their final release versions. The 8.6 release fixes over 300 bugs from the 8.4 series and introduces a number of exciting features. These most notably include: * Significantly better handling of macOS linker command size limits, avoiding linker errors while linking large projects * A new deriving mechanism, `deriving via`, providing a convenient way for users to extend Haskell's typeclass deriving mechanism * Quantified constraints, allowing forall quantification in contexts * An early version of the GHCi `:doc` command * The `ghc-heap-view` package, allowing introspection into the structure of GHC's heap * Valid hole fit hints, helping the user to find terms to fill typed holes in their programs * The BlockArguments extension, allowing the `$` operator to be omitted in some unambiguous contexts * The next phase of the MonadFail proposal, enabling -XMonadFailDesugaring by default A full list of the changes in this release can be found in the release notes: https://downloads.haskell.org/~ghc/8.6.1-beta1/docs/html/users_guide/8.6.1-notes.html This will very likely be the last release before the final 8.6.1 so do give it a thorough testing and, as always, report any issues you encounter. Thanks for your help! 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 varosi at gmail.com Sat Aug 11 15:27:43 2018 From: varosi at gmail.com (Vassil Ognyanov Keremidchiev) Date: Sat, 11 Aug 2018 18:27:43 +0300 Subject: [ANNOUNCE] GHC 8.6.1-beta1 available In-Reply-To: <87y3ddprbw.fsf@smart-cactus.org> References: <87y3ddprbw.fsf@smart-cactus.org> Message-ID: Great news! What are the new features there toward Dependent Typed Haskell? На сб, 11.08.2018 г., 5:31 Ben Gamari написа: > > Hello everyone, > > The GHC development team is very pleased to announce the first beta > leading up to GHC 8.6.1 release. The usual release artifacts are > available from > > https://downloads.haskell.org/~ghc/8.6.1-beta1 > > This beta fixes most of the bugs reported in the first two alphas and > brings all of the core libraries up to their final release versions. > > The 8.6 release fixes over 300 bugs from the 8.4 series and introduces a > number of exciting features. These most notably include: > > * Significantly better handling of macOS linker command size limits, > avoiding linker errors while linking large projects > > * A new deriving mechanism, `deriving via`, providing a convenient way > for users to extend Haskell's typeclass deriving mechanism > > * Quantified constraints, allowing forall quantification in contexts > > * An early version of the GHCi `:doc` command > > * The `ghc-heap-view` package, allowing introspection into the > structure of GHC's heap > > * Valid hole fit hints, helping the user to find terms to fill typed > holes in their programs > > * The BlockArguments extension, allowing the `$` operator to be omitted > in some unambiguous contexts > > * The next phase of the MonadFail proposal, enabling > -XMonadFailDesugaring by default > > A full list of the changes in this release can be found in the > release notes: > > > https://downloads.haskell.org/~ghc/8.6.1-beta1/docs/html/users_guide/8.6.1-notes.html > > This will very likely be the last release before the final 8.6.1 so do > give it a thorough testing and, as always, report any issues you > encounter. Thanks for your help! > > Cheers, > > - Ben > _______________________________________________ > 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 rae at cs.brynmawr.edu Sun Aug 12 18:14:12 2018 From: rae at cs.brynmawr.edu (Richard Eisenberg) Date: Sun, 12 Aug 2018 14:14:12 -0400 Subject: [ANNOUNCE] GHC 8.6.1-beta1 available In-Reply-To: References: <87y3ddprbw.fsf@smart-cactus.org> Message-ID: > On Aug 11, 2018, at 11:27 AM, Vassil Ognyanov Keremidchiev wrote: > > What are the new features there toward Dependent Typed Haskell? Ben's link to https://downloads.haskell.org/~ghc/8.6.1-beta1/docs/html/users_guide/8.6.1-notes.html includes several items, pasted here: * A new StarIsType language extension has been added which controls whether * is parsed as Data.Kind.Type or a regular type operator. StarIsType is enabled by default. * CUSKs now require all kind variables to be explicitly quantified. This was already the case with TypeInType , but now PolyKinds also exhibits this behavior. * Functionality of TypeInType has been subsumed by PolyKinds , and it is now merely a shorthand for PolyKinds , DataKinds , and NoStarIsType . The users are advised to avoid TypeInType due to its misleading name: the Type :: Type axiom holds regardless of whether it is enabled. These are small steps, to be sure, but there's quite a bit going on behind the scenes. For example see the "Coercion Quantification" and "Type-level visible type applications" to take place at HIW (https://icfp18.sigplan.org/track/hiw-2018-papers#event-overview ). There are also a great many proposals in play at https://github.com/ghc-proposals/ghc-proposals More to come in the future, of course! Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: From sam.halliday at gmail.com Wed Aug 22 10:15:53 2018 From: sam.halliday at gmail.com (Sam Halliday) Date: Wed, 22 Aug 2018 11:15:53 +0100 Subject: Unable to compile ghc-8.2.2 with ghc-8.4.3 Message-ID: Hello all, I am unable to compile ghc-8.2.2 with ghc-8.4.3 (which is otherwise working fine, e.g. to compile my own projects and xmonad). Could somebody please help? The error I get is ghc-cabal: Encountered missing dependencies: base >=4.4.1 && <4.11 libraries/hpc/ghc.mk:3: libraries/hpc/dist-boot/package-data.mk: No such file or directory make[1]: *** [libraries/hpc/ghc.mk:3: libraries/hpc/dist-boot/package-data.mk] Error 1 make: *** [Makefile:123: all] Error 2 I should give some background as to why I'm doing this: I am trying to build a back catalogue of ghc installations because the older binary downloads from haskell.org give me linking errors and I've lost faith in Archlinux's ability to package ghc. I plan on using these builds of ghc in stack, instead of their binaries. I don't like downloading binaries. I'd rather build them from source. I will also create a docker image for my own CI purposes. I'm using this script, but it's just a formalisation of the ghc installation instructions to help me automate the process. https://gitlab.com/fommil/ghc-env/blob/master/bin/ghc-env I am on Archlinux, which (I'm sure many of you know) has a very broken concept of ghc. I already lost 2 hours today because Archlinux broke my ~/.ghc, and therefore xmonad was unable to start and this locked me out of my desktop. I plan on using NixOS in the future. From a fresh OS install I do pacman -S ghc-static cabal-install to get me ghc 8.4.3 and the cabal CLI. From here I download and compile ghc 8.4.3 and cabal-install with ghc-env compile 8.4.3 cabal install cabal-install xmonad xmonad-contrib and now I can delete Arch's versions of ghc (yay!). But from here, if I try to compile ghc 8.2.2 (with a view to compile all the way back to the 7.x series) I get the failure at the top. An alternative solution would be if there were instructions for a fabled "phase0" compile, which doesn't require a ghc bootstrap. Does anybody know anything about that? Best regards, Sam From ben at smart-cactus.org Wed Aug 22 11:30:40 2018 From: ben at smart-cactus.org (Ben Gamari) Date: Wed, 22 Aug 2018 07:30:40 -0400 Subject: Unable to compile ghc-8.2.2 with ghc-8.4.3 In-Reply-To: References: Message-ID: <4CA04D5D-E36A-4EFD-8870-AF6061052857@smart-cactus.org> In general we don't support bootstrapping older GHCI with newer GHC. However, you may be able to hack something together by manually tweaking bounds. Cheers, - Ben -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sam.halliday at gmail.com Wed Aug 22 13:01:24 2018 From: sam.halliday at gmail.com (Sam Halliday) Date: Wed, 22 Aug 2018 14:01:24 +0100 Subject: Unable to compile ghc-8.2.2 with ghc-8.4.3 In-Reply-To: <4CA04D5D-E36A-4EFD-8870-AF6061052857@smart-cactus.org> References: <4CA04D5D-E36A-4EFD-8870-AF6061052857@smart-cactus.org> Message-ID: Hi Ben, What is the recommended way to build old versions of GHC? The haskell.org binaries for, e.g. 7.8.3, do not work on my machine. If I attempt to recompile ghc 7.8.3 with the haskell.org binary, I get linkage errors. Actually I'd love to be able to bootstrap a build without any ghc installed... that would solve the problem. I heard about the "phase0" approach from Vitaly Bragilevsky at his Lambdaconf talk this year. But I've been unable to find any documentation about it. Best regards, Sam On 22 August 2018 at 12:30, Ben Gamari wrote: > In general we don't support bootstrapping older GHCI with newer GHC. > However, you may be able to hack something together by manually tweaking > bounds. > > Cheers, > > - Ben > > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > _______________________________________________ > Glasgow-haskell-users mailing list > Glasgow-haskell-users at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users > From amindfv at gmail.com Wed Aug 22 16:05:56 2018 From: amindfv at gmail.com (amindfv at gmail.com) Date: Wed, 22 Aug 2018 09:05:56 -0700 Subject: Unable to compile ghc-8.2.2 with ghc-8.4.3 In-Reply-To: References: <4CA04D5D-E36A-4EFD-8870-AF6061052857@smart-cactus.org> Message-ID: <725CC377-DFC3-4AE9-B85B-9BFD9E1A9AF0@gmail.com> (I haven't actually done this, but:) If you want to be able to install GHC without any GHC binary, I think you'd have to start with an ancient version of GHC which wasn't itself written in Haskell, and build successive versions (skipping as many as possible) until you had a GHC which supported all the language features the most-recent version requires. If you did embark on this, it would be nice if you could report back with a minimal number of steps it takes to get to current GHC! Tom > El 22 ago 2018, a las 06:01, Sam Halliday escribió: > > Hi Ben, > > What is the recommended way to build old versions of GHC? The > haskell.org binaries for, e.g. 7.8.3, do not work on my machine. If I > attempt to recompile ghc 7.8.3 with the haskell.org binary, I get > linkage errors. > > Actually I'd love to be able to bootstrap a build without any ghc > installed... that would solve the problem. I heard about the "phase0" > approach from Vitaly Bragilevsky at his Lambdaconf talk this year. But > I've been unable to find any documentation about it. > > Best regards, > Sam > > >> On 22 August 2018 at 12:30, Ben Gamari wrote: >> In general we don't support bootstrapping older GHCI with newer GHC. >> However, you may be able to hack something together by manually tweaking >> bounds. >> >> Cheers, >> >> - Ben >> >> -- >> Sent from my Android device with K-9 Mail. Please excuse my brevity. >> _______________________________________________ >> Glasgow-haskell-users mailing list >> Glasgow-haskell-users at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users > _______________________________________________ > Glasgow-haskell-users mailing list > Glasgow-haskell-users at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users From sam.halliday at gmail.com Wed Aug 22 16:12:27 2018 From: sam.halliday at gmail.com (Sam Halliday) Date: Wed, 22 Aug 2018 17:12:27 +0100 Subject: Unable to compile ghc-8.2.2 with ghc-8.4.3 In-Reply-To: <725CC377-DFC3-4AE9-B85B-9BFD9E1A9AF0@gmail.com> References: <4CA04D5D-E36A-4EFD-8870-AF6061052857@smart-cactus.org> <725CC377-DFC3-4AE9-B85B-9BFD9E1A9AF0@gmail.com> Message-ID: Hi Tom, I'm not sure it is necessary to go back that far. Vitaly pointed out that any version of GHC could produce the "minimal C" output, which can be ported to another platform that doesn't have a GHC, as the bootstrap. I'm not entirely sure how to generate that output, mind you. On 22 August 2018 at 17:05, wrote: > (I haven't actually done this, but:) If you want to be able to install GHC without any GHC binary, I think you'd have to start with an ancient version of GHC which wasn't itself written in Haskell, and build successive versions (skipping as many as possible) until you had a GHC which supported all the language features the most-recent version requires. > > If you did embark on this, it would be nice if you could report back with a minimal number of steps it takes to get to current GHC! > > Tom > >> El 22 ago 2018, a las 06:01, Sam Halliday escribió: >> >> Hi Ben, >> >> What is the recommended way to build old versions of GHC? The >> haskell.org binaries for, e.g. 7.8.3, do not work on my machine. If I >> attempt to recompile ghc 7.8.3 with the haskell.org binary, I get >> linkage errors. >> >> Actually I'd love to be able to bootstrap a build without any ghc >> installed... that would solve the problem. I heard about the "phase0" >> approach from Vitaly Bragilevsky at his Lambdaconf talk this year. But >> I've been unable to find any documentation about it. >> >> Best regards, >> Sam >> >> >>> On 22 August 2018 at 12:30, Ben Gamari wrote: >>> In general we don't support bootstrapping older GHCI with newer GHC. >>> However, you may be able to hack something together by manually tweaking >>> bounds. >>> >>> Cheers, >>> >>> - Ben >>> >>> -- >>> Sent from my Android device with K-9 Mail. Please excuse my brevity. >>> _______________________________________________ >>> Glasgow-haskell-users mailing list >>> Glasgow-haskell-users at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users >> _______________________________________________ >> Glasgow-haskell-users mailing list >> Glasgow-haskell-users at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users From ben at smart-cactus.org Wed Aug 22 20:20:51 2018 From: ben at smart-cactus.org (Ben Gamari) Date: Wed, 22 Aug 2018 16:20:51 -0400 Subject: Unable to compile ghc-8.2.2 with ghc-8.4.3 In-Reply-To: References: <4CA04D5D-E36A-4EFD-8870-AF6061052857@smart-cactus.org> <725CC377-DFC3-4AE9-B85B-9BFD9E1A9AF0@gmail.com> Message-ID: <0EC0E7EF-4F2A-4D87-B70A-B36CB7265240@smart-cactus.org> Indeed, GHC can indeed produce (very slow) C. This is known as unregisterised mode [1]. That being said, I'm not sure that helps you with the task at hand. Afterall, you still would need a haskell compiler to build your unregisterised compiler. [1] https://ghc.haskell.org/trac/ghc/wiki/Building/Unregisterised On August 22, 2018 12:12:27 PM EDT, Sam Halliday wrote: >Hi Tom, > >I'm not sure it is necessary to go back that far. Vitaly pointed out >that any version of GHC could produce the "minimal C" output, which >can be ported to another platform that doesn't have a GHC, as the >bootstrap. I'm not entirely sure how to generate that output, mind >you. > >On 22 August 2018 at 17:05, wrote: >> (I haven't actually done this, but:) If you want to be able to >install GHC without any GHC binary, I think you'd have to start with an >ancient version of GHC which wasn't itself written in Haskell, and >build successive versions (skipping as many as possible) until you had >a GHC which supported all the language features the most-recent version >requires. >> >> If you did embark on this, it would be nice if you could report back >with a minimal number of steps it takes to get to current GHC! >> >> Tom >> >>> El 22 ago 2018, a las 06:01, Sam Halliday >escribió: >>> >>> Hi Ben, >>> >>> What is the recommended way to build old versions of GHC? The >>> haskell.org binaries for, e.g. 7.8.3, do not work on my machine. If >I >>> attempt to recompile ghc 7.8.3 with the haskell.org binary, I get >>> linkage errors. >>> >>> Actually I'd love to be able to bootstrap a build without any ghc >>> installed... that would solve the problem. I heard about the >"phase0" >>> approach from Vitaly Bragilevsky at his Lambdaconf talk this year. >But >>> I've been unable to find any documentation about it. >>> >>> Best regards, >>> Sam >>> >>> >>>> On 22 August 2018 at 12:30, Ben Gamari >wrote: >>>> In general we don't support bootstrapping older GHCI with newer >GHC. >>>> However, you may be able to hack something together by manually >tweaking >>>> bounds. >>>> >>>> Cheers, >>>> >>>> - Ben >>>> >>>> -- >>>> Sent from my Android device with K-9 Mail. Please excuse my >brevity. >>>> _______________________________________________ >>>> Glasgow-haskell-users mailing list >>>> Glasgow-haskell-users at haskell.org >>>> >http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users >>> _______________________________________________ >>> Glasgow-haskell-users mailing list >>> Glasgow-haskell-users at haskell.org >>> >http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sam.halliday at gmail.com Fri Aug 31 09:10:50 2018 From: sam.halliday at gmail.com (Sam Halliday) Date: Fri, 31 Aug 2018 10:10:50 +0100 Subject: Unable to compile ghc-8.2.2 with ghc-8.4.3 In-Reply-To: <0EC0E7EF-4F2A-4D87-B70A-B36CB7265240@smart-cactus.org> References: <4CA04D5D-E36A-4EFD-8870-AF6061052857@smart-cactus.org> <725CC377-DFC3-4AE9-B85B-9BFD9E1A9AF0@gmail.com> <0EC0E7EF-4F2A-4D87-B70A-B36CB7265240@smart-cactus.org> Message-ID: Hi Ben, This would definitely help. I could use a docker image of a really old OS that has old ghc binaries available, to generate the .c for that old version of GHC (e.g. v 7.0 or something). Then I could use those files to bootstrap a ghc 7.0 on my machine, and from there every version of ghc since. It would make a lot of sense for the "unregistered" sources to be made available as an optional download alongside the source code, if haskell.org were open to that possibility. Best regards, Sam On 22 August 2018 at 21:20, Ben Gamari wrote: > Indeed, GHC can indeed produce (very slow) C. This is known as > unregisterised mode [1]. That being said, I'm not sure that helps you with > the task at hand. Afterall, you still would need a haskell compiler to build > your unregisterised compiler. > > [1] https://ghc.haskell.org/trac/ghc/wiki/Building/Unregisterised > > On August 22, 2018 12:12:27 PM EDT, Sam Halliday > wrote: >> >> Hi Tom, >> >> I'm not sure it is necessary to go back that far. Vitaly pointed out >> that any version of GHC could produce the "minimal C" output, which >> can be ported to another platform that doesn't have a GHC, as the >> bootstrap. I'm not entirely sure how to generate that output, mind >> you. >> >> On 22 August 2018 at 17:05, wrote: >>> >>> (I haven't actually done this, but:) If you want to be able to install >>> GHC without any GHC binary, I think you'd have to start with an ancient >>> version of GHC which wasn't itself written in Haskell, and build successive >>> versions (skipping as many as possible) until you had a GHC which supported >>> all the language features the most-recent version requires. >>> >>> If you did embark on this, it would be nice if you could report back >>> with a minimal number of steps it takes to get to current GHC! >>> >>> Tom >>> >>>> El 22 ago 2018, a las 06:01, Sam Halliday >>>> escribió: >>>> >>>> Hi Ben, >>>> >>>> What is the recommended way to build old versions of GHC? The >>>> haskell.org binaries for, e.g. 7.8.3, do not work on my machine. If I >>>> attempt to recompile ghc 7.8.3 with the haskell.org binary, I get >>>> linkage errors. >>>> >>>> Actually I'd love to be able to bootstrap a build without any ghc >>>> installed... that would solve the problem. I heard about the "phase0" >>>> approach from Vitaly Bragilevsky at his Lambdaconf talk this year. But >>>> I've been unable to find any documentation about it. >>>> >>>> Best regards, >>>> Sam >>>> >>>> >>>>> On 22 August 2018 at 12:30, Ben Gamari wrote: >>>>> In general we don't support bootstrapping older GHCI with newer GHC. >>>>> However, you may be able to hack something together by manually >>>>> tweaking >>>>> bounds. >>>>> >>>>> Cheers, >>>>> >>>>> - Ben >>>>> >>>>> -- >>>>> Sent from my Android device with K-9 Mail. Please excuse my brevity. >>>>> ________________________________ >>>>> >>>>> Glasgow-haskell-users mailing list >>>>> Glasgow-haskell-users at haskell.org >>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users >>>> >>>> ________________________________ >>>> >>>> Glasgow-haskell-users mailing list >>>> Glasgow-haskell-users at haskell.org >>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users > > > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. From svenpanne at gmail.com Fri Aug 31 09:57:55 2018 From: svenpanne at gmail.com (Sven Panne) Date: Fri, 31 Aug 2018 11:57:55 +0200 Subject: Fwd: Unable to compile ghc-8.2.2 with ghc-8.4.3 In-Reply-To: References: <4CA04D5D-E36A-4EFD-8870-AF6061052857@smart-cactus.org> <725CC377-DFC3-4AE9-B85B-9BFD9E1A9AF0@gmail.com> <0EC0E7EF-4F2A-4D87-B70A-B36CB7265240@smart-cactus.org> Message-ID: Am Fr., 31. Aug. 2018 um 11:11 Uhr schrieb Sam Halliday < sam.halliday at gmail.com>: > [...] It would make a lot of sense for the > "unregistered" sources to be made available as an optional download > alongside the source code, if haskell.org were open to that > possibility. IIRC, the generated C code is *not* platform-independent, at least that is what I remember from ancient times. Perhaps I'm wrong and/or this has changed, but if this is really the case, you would need an additional download per target platform. Cheers, S. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at smart-cactus.org Fri Aug 31 14:36:09 2018 From: ben at smart-cactus.org (Ben Gamari) Date: Fri, 31 Aug 2018 10:36:09 -0400 Subject: Unable to compile ghc-8.2.2 with ghc-8.4.3 In-Reply-To: References: <4CA04D5D-E36A-4EFD-8870-AF6061052857@smart-cactus.org> <725CC377-DFC3-4AE9-B85B-9BFD9E1A9AF0@gmail.com> <0EC0E7EF-4F2A-4D87-B70A-B36CB7265240@smart-cactus.org> Message-ID: <87k1o661t8.fsf@smart-cactus.org> Sam Halliday writes: > Hi Ben, > > This would definitely help. I could use a docker image of a really old > OS that has old ghc binaries available, to generate the .c for that > old version of GHC (e.g. v 7.0 or something). Then I could use those > files to bootstrap a ghc 7.0 on my machine, and from there every > version of ghc since. It would make a lot of sense for the > "unregistered" sources to be made available as an optional download > alongside the source code, if haskell.org were open to that > possibility. > This is a very interesting idea. The build system currently isn't really setup in a way to make this possible, but this could likely be changed in our new build system, Hadrian. Also, I suspect this would require some adjustments to the C code generator, which very likely has some platform dependence in its output. Perhaps you'd like to try picking up this task? 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 sam.halliday at gmail.com Fri Aug 31 15:40:35 2018 From: sam.halliday at gmail.com (Sam Halliday) Date: Fri, 31 Aug 2018 16:40:35 +0100 Subject: Unable to compile ghc-8.2.2 with ghc-8.4.3 In-Reply-To: <87k1o661t8.fsf@smart-cactus.org> References: <4CA04D5D-E36A-4EFD-8870-AF6061052857@smart-cactus.org> <725CC377-DFC3-4AE9-B85B-9BFD9E1A9AF0@gmail.com> <0EC0E7EF-4F2A-4D87-B70A-B36CB7265240@smart-cactus.org> <87k1o661t8.fsf@smart-cactus.org> Message-ID: Hi Ben, Updating the new build tool is e right thing to do, long term, but it unfortunate doesn't help with my objective of compiling old versions of ghc ... but there is a quick here that I could exploit. Since I'm building for the same platform, bug just using different versions of the operating system, I think I can create the C files in an old Debian inside docker and use them in the more modern host machine to build the old ghc. On Fri, 31 Aug 2018, 15:36 Ben Gamari, wrote: > Sam Halliday writes: > > > Hi Ben, > > > > This would definitely help. I could use a docker image of a really old > > OS that has old ghc binaries available, to generate the .c for that > > old version of GHC (e.g. v 7.0 or something). Then I could use those > > files to bootstrap a ghc 7.0 on my machine, and from there every > > version of ghc since. It would make a lot of sense for the > > "unregistered" sources to be made available as an optional download > > alongside the source code, if haskell.org were open to that > > possibility. > > > This is a very interesting idea. The build system currently isn't > really setup in a way to make this possible, but this could likely be > changed in our new build system, Hadrian. Also, I suspect this would > require some adjustments to the C code generator, which very likely has > some platform dependence in its output. > > Perhaps you'd like to try picking up this task? > > Cheers, > > - Ben > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.franksen at online.de Fri Aug 31 16:48:04 2018 From: ben.franksen at online.de (Ben Franksen) Date: Fri, 31 Aug 2018 18:48:04 +0200 Subject: Fwd: Unable to compile ghc-8.2.2 with ghc-8.4.3 In-Reply-To: References: <4CA04D5D-E36A-4EFD-8870-AF6061052857@smart-cactus.org> <725CC377-DFC3-4AE9-B85B-9BFD9E1A9AF0@gmail.com> <0EC0E7EF-4F2A-4D87-B70A-B36CB7265240@smart-cactus.org> Message-ID: Am 31.08.2018 um 11:57 schrieb Sven Panne: > Am Fr., 31. Aug. 2018 um 11:11 Uhr schrieb Sam Halliday < > sam.halliday at gmail.com>: > >> [...] It would make a lot of sense for the >> "unregistered" sources to be made available as an optional download Note that the term is "unregisterized" which refers to putting certain global variables into registers; you can't do that in C code. Cheers Ben (another one) From svenpanne at gmail.com Fri Aug 31 18:58:41 2018 From: svenpanne at gmail.com (Sven Panne) Date: Fri, 31 Aug 2018 20:58:41 +0200 Subject: Fwd: Unable to compile ghc-8.2.2 with ghc-8.4.3 In-Reply-To: References: <4CA04D5D-E36A-4EFD-8870-AF6061052857@smart-cactus.org> <725CC377-DFC3-4AE9-B85B-9BFD9E1A9AF0@gmail.com> <0EC0E7EF-4F2A-4D87-B70A-B36CB7265240@smart-cactus.org> Message-ID: Am Fr., 31. Aug. 2018 um 18:52 Uhr schrieb Ben Franksen < ben.franksen at online.de>: > Am 31.08.2018 um 11:57 schrieb Sven Panne: > > Am Fr., 31. Aug. 2018 um 11:11 Uhr schrieb Sam Halliday < > > sam.halliday at gmail.com>: > > > >> [...] It would make a lot of sense for the > >> "unregistered" sources to be made available as an optional download > > Note that the term is "unregisterized" which refers to putting certain > global variables into registers; you can't do that in C code. > That's only correct for standard C, for GCC there is https://gcc.gnu.org/onlinedocs/gcc/Global-Register-Variables.html. IIRC this is exactly how old unregistered builds worked. I am not even sure if the unregistered builds ever worked *without* GCC, perhaps there was some CPP magic, but I can't remember.... -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Fri Aug 31 19:17:38 2018 From: allbery.b at gmail.com (Brandon Allbery) Date: Fri, 31 Aug 2018 15:17:38 -0400 Subject: Fwd: Unable to compile ghc-8.2.2 with ghc-8.4.3 In-Reply-To: References: <4CA04D5D-E36A-4EFD-8870-AF6061052857@smart-cactus.org> <725CC377-DFC3-4AE9-B85B-9BFD9E1A9AF0@gmail.com> <0EC0E7EF-4F2A-4D87-B70A-B36CB7265240@smart-cactus.org> Message-ID: I don't think ghc ever used gcc's version of this; it used the Evil Mangler to do it. On Fri, Aug 31, 2018 at 2:59 PM Sven Panne wrote: > Am Fr., 31. Aug. 2018 um 18:52 Uhr schrieb Ben Franksen < > ben.franksen at online.de>: > >> Am 31.08.2018 um 11:57 schrieb Sven Panne: >> > Am Fr., 31. Aug. 2018 um 11:11 Uhr schrieb Sam Halliday < >> > sam.halliday at gmail.com>: >> > >> >> [...] It would make a lot of sense for the >> >> "unregistered" sources to be made available as an optional download >> >> Note that the term is "unregisterized" which refers to putting certain >> global variables into registers; you can't do that in C code. >> > > That's only correct for standard C, for GCC there is > https://gcc.gnu.org/onlinedocs/gcc/Global-Register-Variables.html. IIRC > this is exactly how old unregistered builds worked. I am not even sure if > the unregistered builds ever worked *without* GCC, perhaps there was some > CPP magic, but I can't remember.... > _______________________________________________ > Glasgow-haskell-users mailing list > Glasgow-haskell-users at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users > -- brandon s allbery kf8nh allbery.b at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From svenpanne at gmail.com Fri Aug 31 19:49:02 2018 From: svenpanne at gmail.com (Sven Panne) Date: Fri, 31 Aug 2018 21:49:02 +0200 Subject: Fwd: Unable to compile ghc-8.2.2 with ghc-8.4.3 In-Reply-To: References: <4CA04D5D-E36A-4EFD-8870-AF6061052857@smart-cactus.org> <725CC377-DFC3-4AE9-B85B-9BFD9E1A9AF0@gmail.com> <0EC0E7EF-4F2A-4D87-B70A-B36CB7265240@smart-cactus.org> Message-ID: Am Fr., 31. Aug. 2018 um 21:17 Uhr schrieb Brandon Allbery < allbery.b at gmail.com>: > I don't think ghc ever used gcc's version of this; it used the Evil > Mangler to do it. > Well, I actually *do* think it used GCC's global variables: I fixed GHC in the late 90's to make it work on HP-UX, and I'm quite sure that this involved fiddling around with header files, finding suitable registers, describing stack layout, fixing alignment problems etc. Alas, I don't have any unregistered build for GHC 0.29 (?) on HP-UX 10 at hand anymore. :-D Perhaps one of the Simons remembers the details... > -------------- next part -------------- An HTML attachment was scrubbed... URL: