From anthony_clayden at clear.net.nz Wed Jul 4 23:36:48 2018 From: anthony_clayden at clear.net.nz (Anthony Clayden) Date: Thu, 5 Jul 2018 11:36:48 +1200 Subject: [Hugs-users] needing some Hugs In-Reply-To: References: Message-ID: > > Is anybody still listening here? I see the Hugs source distro is still around - vintage 2006, and there's somebody curated it on github. I'm particularly looking for a version with TRex, but the github-curated version doesn't seem to include that(?) Can anybody comment on how easy it is to compile Hugs (on Windows), compared to compiling GHC? The instructions for Hugs make out it's reasonably easy, whereas the instructions for GHC seem to be fraught with gotchas. But perhaps Hugs has as many gotchas, just not documented(?) My impression from discussion forums when Hugs was still active, is that Hugs source was easier to hack if you wanted to experiment with changes to the language(?) What seems sad these days is that GHC is so monstrous and formidable, hardly anybody builds experimental extensions to Haskell. Thank you AntC -------------- next part -------------- An HTML attachment was scrubbed... URL: From oakad at yahoo.com Thu Jul 5 01:30:17 2018 From: oakad at yahoo.com (Alex Dubov) Date: Thu, 5 Jul 2018 01:30:17 +0000 (UTC) Subject: [Hugs-users] needing some Hugs In-Reply-To: References: Message-ID: <360374697.2874524.1530754217798@mail.yahoo.com> > On Thursday, 5 July 2018, 9:37:14 am AEST, Anthony Clayden wrote: > > > > Is anybody still listening here? > > I see the Hugs source distro is still around - vintage 2006, and there's somebody curated it on github. > > I'm particularly looking for a version with TRex, but the github-curated version doesn't seem to include that(?) > > Can anybody comment on how easy it is to compile Hugs (on Windows), compared to compiling GHC? The instructions for Hugs make out it's reasonably easy, whereas the instructions for GHC seem to be fraught with gotchas. But perhaps Hugs has as many gotchas, just not documented(?) > > My impression from discussion forums when Hugs was still active, is that Hugs source was easier to hack if you wanted to experiment with changes to the language(?) > > What seems sad these days is that GHC is so monstrous and formidable, hardly anybody builds experimental extensions to Haskell. > > Thank you > AntC > Back in a day, I wanted to build an embeddable Haskell interpreter for guile-like (or js-like) uses. And yes, hugs was way more approachable then GHC - it was mostly rather clear-cut  C code which was easy to rearrange and recompile. But those days most people are on managed run-times anyway (be it jvm, clr or something js-based) and those can do scripting and extensions just fine as they are. Regards, Alex D From ndmitchell at gmail.com Thu Jul 5 08:14:17 2018 From: ndmitchell at gmail.com (Neil Mitchell) Date: Thu, 5 Jul 2018 09:14:17 +0100 Subject: [Hugs-users] needing some Hugs In-Reply-To: References: Message-ID: Hi Ant, I don't believe anyone still maintains or uses Hugs - you'd be better off looking at GHC. Thanks, Neil On Thu, Jul 5, 2018 at 12:37 AM Anthony Clayden wrote: > > Is anybody still listening here? > > I see the Hugs source distro is still around - vintage 2006, and there's somebody curated it on github. > > I'm particularly looking for a version with TRex, but the github-curated version doesn't seem to include that(?) > > Can anybody comment on how easy it is to compile Hugs (on Windows), compared to compiling GHC? The instructions for Hugs make out it's reasonably easy, whereas the instructions for GHC seem to be fraught with gotchas. But perhaps Hugs has as many gotchas, just not documented(?) > > My impression from discussion forums when Hugs was still active, is that Hugs source was easier to hack if you wanted to experiment with changes to the language(?) > > What seems sad these days is that GHC is so monstrous and formidable, hardly anybody builds experimental extensions to Haskell. > > Thank you > AntC > > _______________________________________________ > Hugs-Users mailing list > Hugs-Users at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/hugs-users From anthony_clayden at clear.net.nz Thu Jul 5 09:46:23 2018 From: anthony_clayden at clear.net.nz (Anthony Clayden) Date: Thu, 5 Jul 2018 21:46:23 +1200 Subject: [Hugs-users] needing some Hugs In-Reply-To: References: Message-ID: On Thu, 5 Jul 2018 at 8:29 PM, Neil Mitchell wrote: > Hi Ant, > Thanks for replying Neil. > I don't believe anyone still maintains or uses Hugs Yes, that's what I was expecting. - you'd be better off looking at GHC. > Why? I mean seriously: if the docos for TRex are accurate, all that non-maintenance for Hugs has still produced a better records system than GHC has managed, in well over a decade. GHC has some tweaks for records (FieldPuns and DisambiguateRecordFields and friends, also now DuplicateRecordFields). But Trex would appear to have all that covered. Vintage ~2006 Hugs (with extensions) was very comparable to GHC (with glasgow-exts). There are some subtle differences in implementation of FunDeps and overlaps. GHC's implementation is what I'd call wrong/contrary to the literature. (SPJ's word is "bogus".) Hugs' implementation is more along the right lines. GHC's behaviour today is the same as 2006. Clearly it's not going to be fixed. GHC now has Type Families, which sometimes gives prettier code than FunDeps/overlaps. But no more functionality AFAICT. GHC has GADTs -- which I've never felt much use for. GHC has PolyKinds and DataKinds and Type-in-type, whose main effect is to generate impenetrable error messages (even when I didn't think I was using those extensions). (You can achieve DataKinds in Hugs with empty data decls -- see for example the HList paper.) Then I'm struggling to see anything for which I'd be "better off" with GHC. My experience from trying to contribute to the GHC design process is that GHC is becoming more complex, more abstract, more obtuse, its Haskell syntax is uglier (like Perl), and no more useful. The first extension since 2006 for which I see merit is the Quantified constraints. (It's hard to be sure until it's released and I can get my hands on it. I have in mind uses that haven't appeared in the literature or Trac testing. And my questions/suggestions have gone unanswered.) Note all the nutting-out for that was in an SPJ paper in 2000. "unanswered" seems to be a recurring issue with GHC 'maintenance' which is why I'm questioning your "better off". I seldom get answers to Stackoverflow q's or glasgow-users posts or cafe bright ideas. So thank you again for replying here. The features I'm looking for are clearly not going to happen unless I hack them myself. (In particular something that was sketched in a paper in 2002.) Hence my question here: I have a suspicion all that feature-bloat in GHC has made it harder to hack than it was in 2006. (And it seems it was already harder than for Hugs.) AntC > On Thu, Jul 5, 2018 at 12:37 AM Anthony Clayden > wrote: > > > > Is anybody still listening here? > > > > I see the Hugs source distro is still around - vintage 2006, and there's > somebody curated it on github. > > > > I'm particularly looking for a version with TRex, but the github-curated > version doesn't seem to include that(?) > > > > Can anybody comment on how easy it is to compile Hugs (on Windows), > compared to compiling GHC? The instructions for Hugs make out it's > reasonably easy, whereas the instructions for GHC seem to be fraught with > gotchas. But perhaps Hugs has as many gotchas, just not documented(?) > > > > My impression from discussion forums when Hugs was still active, is that > Hugs source was easier to hack if you wanted to experiment with changes to > the language(?) > > > > What seems sad these days is that GHC is so monstrous and formidable, > hardly anybody builds experimental extensions to Haskell. > > > > Thank you > > AntC > > > > _______________________________________________ > > Hugs-Users mailing list > > Hugs-Users at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/hugs-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ndmitchell at gmail.com Thu Jul 5 16:52:12 2018 From: ndmitchell at gmail.com (Neil Mitchell) Date: Thu, 5 Jul 2018 17:52:12 +0100 Subject: [Hugs-users] needing some Hugs In-Reply-To: References: Message-ID: > Why? Of course, your choice, merely relaying what is my advice. > I mean seriously: if the docos for TRex are accurate, all that non-maintenance for Hugs has still produced a better records system than GHC has managed, in well over a decade. > GHC has some tweaks for records (FieldPuns and DisambiguateRecordFields and friends, also now DuplicateRecordFields). > But Trex would appear to have all that covered. Yep, but Hugs doesn't have any modern libraries that work with it. > GHC's behaviour today is the same as 2006. Clearly it's not going to be fixed. I'm working to fix the GHC record behaviour :) > "unanswered" seems to be a recurring issue with GHC 'maintenance' which is why I'm questioning your "better off". > I seldom get answers to Stackoverflow q's or glasgow-users posts or cafe bright ideas. > So thank you again for replying here. That must be frustrating. All I can promise is you'll probably get less support on Hugs. There are other Haskell compilers, Jhc, ajhc etc that might be more alive than Hugs. Compiler hacking can be lonely! Thanks, Neil >> >> On Thu, Jul 5, 2018 at 12:37 AM Anthony Clayden >> wrote: >> > >> > Is anybody still listening here? >> > >> > I see the Hugs source distro is still around - vintage 2006, and there's somebody curated it on github. >> > >> > I'm particularly looking for a version with TRex, but the github-curated version doesn't seem to include that(?) >> > >> > Can anybody comment on how easy it is to compile Hugs (on Windows), compared to compiling GHC? The instructions for Hugs make out it's reasonably easy, whereas the instructions for GHC seem to be fraught with gotchas. But perhaps Hugs has as many gotchas, just not documented(?) >> > >> > My impression from discussion forums when Hugs was still active, is that Hugs source was easier to hack if you wanted to experiment with changes to the language(?) >> > >> > What seems sad these days is that GHC is so monstrous and formidable, hardly anybody builds experimental extensions to Haskell. >> > >> > Thank you >> > AntC >> > >> > _______________________________________________ >> > Hugs-Users mailing list >> > Hugs-Users at haskell.org >> > http://mail.haskell.org/cgi-bin/mailman/listinfo/hugs-users From doug at cs.dartmouth.edu Fri Jul 6 14:03:50 2018 From: doug at cs.dartmouth.edu (Doug McIlroy) Date: Fri, 06 Jul 2018 10:03:50 -0400 Subject: [Hugs-users] needing some Hugs Message-ID: <201807061403.w66E3ogu113409@tahoe.cs.Dartmouth.EDU> I have little constructive to say on the topic, except that I typically use hugs in preference to "monstrous" ghc/ghci. It's lightweight and its language is properly documented (in the Haskell 98 report), neither of which can be said of ghc. Its rudimentary instrumentation (:set +s) is more useful than ghc's equivalent, though admittedly ghc has many debugging features I haven't explored. That said, it should be noted that I do not use Haskell (nor, nowadays, any other language) for writing production code. Apropos of language, a couple of years ago I noted that ghc implements 2^99 languages, not one. (There were 99 non-antonymous language pragmas; there may be more now.) Who can know what terrors lurk there. My first attempt to investigate the field (turn on all 99) caused a compiler panic, since fixed. Early on, I encountered a hugs bug: garbage collection in the middle of a bignum operation caused havoc. Having never looked at the hugs source before, I was able quite quickly pinpoint the offending code; the maintainers corrected it almost overnight. That heart-warming experience hasn't worn off, even though the maintainers have moved on. Doug From simonpj at microsoft.com Fri Jul 6 14:46:33 2018 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Fri, 6 Jul 2018 14:46:33 +0000 Subject: [Hugs-users] needing some Hugs In-Reply-To: <201807061403.w66E3ogu113409@tahoe.cs.Dartmouth.EDU> References: <201807061403.w66E3ogu113409@tahoe.cs.Dartmouth.EDU> Message-ID: | ghc/ghci. It's lightweight and its language is properly documented (in the | Haskell 98 report), neither of which can be said of ghc. I think that’s a little unfair to GHC 😊. If you don't give any language extension flags you get Haskell 98 -- or nowadays Haskell 2010. Simon | -----Original Message----- | From: Hugs-Users On Behalf Of Doug McIlroy | Sent: 06 July 2018 15:04 | To: hugs-users at haskell.org | Subject: Re: [Hugs-users] needing some Hugs | | I have little constructive to say on the topic, except that I typically use | hugs in preference to "monstrous" | ghc/ghci. It's lightweight and its language is properly documented (in the | Haskell 98 report), neither of which can be said of ghc. Its rudimentary | instrumentation (:set +s) is more useful than ghc's equivalent, though | admittedly ghc has many debugging features I haven't explored. | | That said, it should be noted that I do not use Haskell (nor, nowadays, any | other language) for writing production code. | | Apropos of language, a couple of years ago I noted that ghc implements 2^99 | languages, not one. (There were 99 non-antonymous language pragmas; there | may be more now.) Who can know what terrors lurk there. | My first attempt to investigate the field (turn on all 99) caused a compiler | panic, since fixed. | | Early on, I encountered a hugs bug: garbage collection in the middle of a | bignum operation caused havoc. | Having never looked at the hugs source before, I was able quite quickly | pinpoint the offending code; the maintainers corrected it almost overnight. | That heart-warming experience hasn't worn off, even though the maintainers | have moved on. | | Doug | _______________________________________________ | Hugs-Users mailing list | Hugs-Users at haskell.org | http://mail.haskell.org/cgi-bin/mailman/listinfo/hugs-users From doug at cs.dartmouth.edu Sat Jul 7 02:55:59 2018 From: doug at cs.dartmouth.edu (Doug McIlroy) Date: Fri, 06 Jul 2018 22:55:59 -0400 Subject: [Hugs-users] [hugs-users] ned some Hugs Message-ID: <201807070255.w672txIb016899@tahoe.cs.Dartmouth.EDU> GHC plays fast and looose with the Haskell 2010 prelude. Two examples: GHC drops Eq from the context of class Num. GHC introduces class Applicative. You will stumble over such discrepancies if you try to write or read GHC code as if it were Haskell 2010. Doug >From simonpj at microsoft.com Fri Jul 6 10:46:41 2018 > | ghc/ghci. It's lightweight and its language is properly documented (in the > | Haskell 98 report), neither of which can be said of ghc. > I think that’s a little unfair to GHC 😊. If you don't give any language extension flags you get Haskell 98 -- or nowadays Haskell 2010. > Simon From anthony_clayden at clear.net.nz Sat Jul 7 13:15:30 2018 From: anthony_clayden at clear.net.nz (Anthony Clayden) Date: Sun, 8 Jul 2018 01:15:30 +1200 Subject: [Hugs-users] needing some Hugs In-Reply-To: References: <201807061403.w66E3ogu113409@tahoe.cs.Dartmouth.EDU> Message-ID: Thanks Doug for your words of encouragement. [Doug] | | hugs in preference to "monstrous" ghc/ghci. It's lightweight ... I agree in 'calculator mode', lightweight is a definite advantage. It's a terrific way to ease into functional programming. Haskell syntax of that era is aesthetically at the sweet spot between succinct-terse-cryptic-hieroglyphics-line noise. | | and its language is properly documented (in the Haskell 98 report), Hmm. My OP is clear I want Hugs 2006 with all extensions. So more than H98, indeed more than H2010. | | neither of which can be said of ghc. I think you're being over-generous to Hugs. Both Hugs and GHC document each feature individually. The trouble is they don't document how features interact. (Occasionally there's a 'grand unifying theorem', like OutsideIn(X). I'm afraid the grand unifying type-in-type/path to Dependent Types is just too much for a bear of very little brain.) So your point about 2^99 languages is well made. Specifically for anonymous/extensible record systems, all of them (TRex -- probably special hard coding, HList, Ur/web -- beyond Haskell but not extensible, endless libraries on Hackage -- mostly using TH boilerplate -- despite that mostly not extensible) rely on the interaction of Overlaps and FunDeps -- hence the focus of my rant. GHC's implementation is broken; Hugs just plays safe and disallows any interaction. All the hip kids play in the lenses space. I guess they want their code to look like Perl or TECO, brogrammer style. Sometime they'll discover why hierarchical data structures fell so badly out of fashion in the 1980's. On Sat, 7 Jul 2018 at 2:46 AM, Simon Peyton Jones wrote: > > I think that’s a little unfair to GHC 😊. If you don't give any language > extension flags you get Haskell 98 -- or nowadays Haskell 2010. > Thanks Simon, but that's true only up to a point (Lord Copper). I don't configure for pure H2010, see above. I do configure for a handful of extensions; I do wish error messages didn't suggest all sorts of high-fallutin' things I might have meant when I merely made a typo. GHC's syntax space is getting so crowded now that a typo is quite likely to get mis-parsed as trying to use some feature I didn't even know existed. Then I appreciate Hugs doesn't confuse me with those possibilities. Oh, and as Doug mentions in his follow-up message: Libraries. I get it that's strictly-speaking not within GHC's bailiwick. I don't want all that abstruse category-theory shit. I want `length` applicable to a List and only to a List. And not to throw messages about instances of Foldable. So when Neil says "Hugs doesn't have any modern libraries " I'm seeing that as another benefit. Yes I know I could opt for a simpler Prelude; I could override the type for `length`. I resent that casual users/newbies must jump through hoops to do that. The onus should be on those who want fancy stuff to jump through the hoops -- for them it's not a burden. Like Doug, I'm not aiming to produce production code. Nor production-level mods to any compiler. AntC > | -----Original Message----- > | From: Hugs-Users On Behalf Of Doug > McIlroy > | Sent: 06 July 2018 15:04 > | To: hugs-users at haskell.org > | Subject: Re: [Hugs-users] needing some Hugs > | > | I have little constructive to say on the topic, except that I typically > use > | hugs in preference to "monstrous" > | ghc/ghci. It's lightweight and its language is properly documented (in > the > | Haskell 98 report), neither of which can be said of ghc. Its rudimentary > | instrumentation (:set +s) is more useful than ghc's equivalent, though > | admittedly ghc has many debugging features I haven't explored. > | > | That said, it should be noted that I do not use Haskell (nor, nowadays, > any > | other language) for writing production code. > | > | Apropos of language, a couple of years ago I noted that ghc implements > 2^99 > | languages, not one. (There were 99 non-antonymous language pragmas; > there > | may be more now.) Who can know what terrors lurk there. > | My first attempt to investigate the field (turn on all 99) caused a > compiler > | panic, since fixed. > | > | Early on, I encountered a hugs bug: garbage collection in the middle of > a > | bignum operation caused havoc. > | Having never looked at the hugs source before, I was able quite quickly > | pinpoint the offending code; the maintainers corrected it almost > overnight. > | That heart-warming experience hasn't worn off, even though the > maintainers > | have moved on. > | > | Doug > | _______________________________________________ > | Hugs-Users mailing list > | Hugs-Users at haskell.org > | http://mail.haskell.org/cgi-bin/mailman/listinfo/hugs-users > _______________________________________________ > Hugs-Users mailing list > Hugs-Users at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/hugs-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthony_clayden at clear.net.nz Sat Jul 28 00:35:14 2018 From: anthony_clayden at clear.net.nz (Anthony Clayden) Date: Sat, 28 Jul 2018 12:35:14 +1200 Subject: [Hugs-users] Hugging to bits Message-ID: Thank you for the encouraging words to my previous thread. I can report Hugs is indeed easy to hack. Getting to build from source was only mildly painful. (Mostly due to my total ignorance of Unix.) After being so used to Functional thinking, it is a wrench going back to programming in procedural code (C/C++) with side-effects and global variables. But I'm only tweaking the logic, not building anything from the ground up. (I've not before programmed in earnest in C, but it seems close enough to BCPL from my varsity days.) Chiefly, as I suspected, Hugs has a very firm foundation to start from. There's a deal of static type/class/instance analysis built up from the program text, which means I can easily detect the conditions under which I want to relax some of Hugs well-principled rules. (I'm implementing well-principled but more subtle rules.) So I have a modified version of the FD consistency rules, that supports expressing a type-level type equality test, but avoids the bogusness in GHC Trac #10675. With the equality test I can now express all the examples in the HList paper [2004] -- those guys abandoned Hugs. I have a better version of the instance overlap rules, determined statically from examining instance heads. IMO GHC's deferred checking is far too shonky: you think your instances are OK then many moons later you (or more likely somebody using your library) gets puzzling rejections to do with overlaps. A quick q in case anybody's listening: Hugs used to have something called 'Multi-instance' overlap resolution. There's references to it in the code and older documentation. But it's broken and was withdrawn. Anybody know what it was trying to do or where I can find docos? It seems it was trying to defer checking much like GHC, in which case I won't pursue it. I'm now working through an approach for my 'Instance Apartness Guards' proposal https://github.com/AntC2/ghc-proposals/blob/instance-apartness-guards/proposals/0000-instance-apartness-guards.rst I can express all the examples there, including the very awkward Andy A-M one (using classes/instances with FunDeps rather than type families). But it needs inserting extra instances and lots of instance constraints for type improvement. So my next hack is to change the rules for overlap resolution where there's also FunDep(s). Again this can all be done at static analysis time: Hugs determines the sequence to try instances as it processes/validates each instance. It is a joy to work in a version of Haskell that has what I want; and not a load of cruft I don't want, but which causes continual obfuscation. Thank you again to the Hugs team. AntC -------------- next part -------------- An HTML attachment was scrubbed... URL: