partial evaluation

2002-01-31 Thread David Feuer
it. If it does not, I would guess it would probably be fairly easy to add to the end of the code generation phase. David Feuer This message has been brought to you by the letter alpha and the number pi. ___ Glasgow-haskell-users mailing list [EMAIL

the GCC snapshot

2002-02-05 Thread David Feuer
What is arbitrarily ranked polymorphism? I don't understand anything past rank 2... Is this arbitrarily ranked polymorphism decidable? This message has been brought to you by the letter alpha and the number pi. ___ Glasgow-haskell-users mailing

Edison library

2002-02-12 Thread David Feuer
Anyone know if Okasaki plans to expand Edison to include efficient sets and/or other non-heap collections? It looks like the library hasn't changed for 2 years... David Feuer ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http

RE: Edison library

2002-02-12 Thread David Feuer
] [mailto:[EMAIL PROTECTED]]On Behalf Of David Feuer Sent: Tuesday, February 12, 2002 3:16 PM To: [EMAIL PROTECTED] Subject: Edison library Anyone know if Okasaki plans to expand Edison to include efficient sets and/or other non-heap collections? It looks like the library hasn't changed

Data constructors and pattern matching

2002-02-19 Thread David Feuer
: You can get this with views, but it's more clunky that way. David Feuer ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

IArray

2002-02-22 Thread David Feuer
What is IArray? This seems rather mysterious to me. David Feuer ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

mangler

2002-02-27 Thread David Feuer
How much (quantitatively) is gained by using GCC for compilation? It sure sounds like it causes a lot of trouble. How much better is it than an optimizing assembler? David Feuer ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http

Re: explicitly quantified classes in functions

2002-04-04 Thread David Feuer
On Thu, Apr 04, 2002, Hal Daume III wrote: Why can I not define the following (in ghc): class Foo p where instance Foo Double where foo :: Double - (forall q . Foo q = q) foo p = p From my humble (lack of) knowledge, there seems to be nothing wrong here, but ghc (5.03) complains

Re: An answer and a question to GHC implementors [was Re: How to make Claessen's Refs Ord-able?]

2002-04-09 Thread David Feuer
On Tue, Apr 09, 2002, Simon Marlow wrote: muse I did wonder once whether IO monad bindings should be allowed at the top-level of a module, so you could say module M where ref - newIORef 42 and the top-level IO would be executed as part of the module initialization code. This

Re: composeList

2002-05-12 Thread David Feuer
See comments below. On Sun, May 12, 2002, David Feuer wrote: On Sun, May 12, 2002, Emre Tezel wrote: Hi all, I recently bought Simon Thompson's Haskell book. I have been doing the exercises while I read on. There are couple questions that I can not solve. Any help would be greatly

Re: Hiding import behaviour

2014-10-16 Thread David Feuer
I think this is a great idea. I also think it should apply to the name shadowing warning—identifiers imported implicitly should never trigger that. On Thu, Oct 16, 2014 at 6:19 PM, Malcolm Gooding goodi...@gmail.com wrote: With the prelude changes that people have been discussing recently I've

Re: Hiding import behaviour

2014-10-16 Thread David Feuer
It should be good enough (for what you're talking about) to hide them all. Turn import A (foo) import B (bar) import C hiding (baz) import D into import A (foo) import B (bar) import C hiding (foo,bar,baz) import D hiding (foo,bar) There's no reason to worry about hiding nonexistent

Re: Hiding import behaviour

2014-10-18 Thread David Feuer
You mention only unqualified imports, but if we do this, it should also apply to qualified ones: import qualified Data.List as L import qualified MyModule as L (isInfixOf) On Oct 18, 2014 2:02 PM, htebalaka goodi...@gmail.com wrote: On 10/17/14 12:32, Alexander Berntsen wrote: On 17/10/14

Re: Hiding import behaviour

2014-10-18 Thread David Feuer
I'm generally in favor of the proposal, but I figured I should mention one situation when I personally might find this confusing. If the module import list is very long, and includes an unrestricted import of a well-known module, it might be easy to assume a certain well-known function comes from

Re: Hiding module *exports*

2014-10-27 Thread David Feuer
+1. On Sun, Oct 26, 2014 at 3:28 PM, Tom Murphy amin...@gmail.com wrote: (Not to be confused with the hiding import behavior discussion also going on) -- Currently, I'm able to write module Foo where to export everything defined in Foo. If, though, I add to the module some definitions

Re: RFC: Dropping Windows XP support

2014-11-07 Thread David Feuer
+1. Windows XP was Microsoft's most successful OS thus far, but it's pretty much dead now. One potentially related potential concern: how will this change affect Wine support? On Fri, Nov 7, 2014 at 1:16 PM, Austin Seipp aus...@well-typed.com wrote: Hi all, This is a quick discussion about

Re: Rules for class methods and Safe Haskell

2014-11-13 Thread David Feuer
That's an interesting question. I'm not even close to an expert, but I *think* that parametricity prevents those particular rules from breaking Safe Haskell guarantees. The laws may not *hold* for a broken instance, but I don't *think* that lets you break type safety or IO encapsulation. On Nov

Re: The future of the Haskell98 and Haskell2010 packages

2014-11-18 Thread David Feuer
I think you're right, and that's a strong reason to come up with an update to the Haskell Report. Include in it, at least: -- Big-ticket items 0. Monoid 1. Foldable, Traversable 2. Applicative 3. Applicative = Monad -- side notes 4. inits = map reverse . scanl (flip (:)) [] -- efficiency—not

Re: Found hole

2015-01-20 Thread David Feuer
Just use exit_ or something instead. Typed holes are a *really useful* mechanism. On Tue, Jan 20, 2015 at 3:51 PM, migmit mig...@gmail.com wrote: DON'T DO THAT! Seriously, turn off compile-time type checking completely just to start an identifier with an underscore??? Отправлено с iPad 20

Re: ghc-7.10.0 type inference regression when faking injective type families

2015-01-20 Thread David Feuer
Wrongly, as it turned out. Sorry! The problem remains. On Tue, Jan 20, 2015 at 2:37 PM, David Feuer david.fe...@gmail.com wrote: And I've closed it as worksforme. I couldn't reproduce the problem with 7.11.20150103. On Tue, Jan 20, 2015 at 11:42 AM, adam vogt vogt.a...@gmail.com wrote: I've

Re: Found hole

2015-01-21 Thread David Feuer
On Jan 21, 2015 9:53 AM, Stephen Paul Weber singpol...@singpolyma.net wrote: Having them on by default mean that valid Haskell2010 programs might get rejected by GHC by default, which is a pretty bad state of affairs. It would be if it were true. But it's not. All that changes is that you get

Re: Found hole

2015-01-21 Thread David Feuer
If such verbiage is added, it should probably read more like If you did not intend to insert a typed hole, _foo may have been misspelled. On Jan 21, 2015 9:11 AM, Volker Wysk vertei...@volker-wysk.de wrote: Am Mittwoch, 21. Januar 2015, 11:03:38 schrieben Sie: If there's any comments on how

Re: ghc-7.10.0 type inference regression when faking injective type families

2015-01-20 Thread David Feuer
And I've closed it as worksforme. I couldn't reproduce the problem with 7.11.20150103. On Tue, Jan 20, 2015 at 11:42 AM, adam vogt vogt.a...@gmail.com wrote: I've added it as https://ghc.haskell.org/trac/ghc/ticket/10009 On Tue, Jan 20, 2015 at 11:23 AM, Richard Eisenberg e...@cis.upenn.edu

Proposal: Turn on ScopedTypeVariables by default

2015-02-23 Thread David Feuer
I know this will be controversial, because it can break (weird) code and because it's not Haskell 2010, but hey, you can't make brain salad without breaking a few heads. ScopedTypeVariables is just awesome for two fundamental reasons: 1. It lets you write type signatures for more things. 2. It

Future of the boxes package--call for ideas

2015-01-13 Thread David Feuer
I've just taken over maintainership of the boxes package, and will be making a maintenance release shortly (as soon as I figure out how and get added to the maintainers group). The package, however, currently suffers from a paucity of bug reports (no problem) and feature requests (not so great).

Re: Increased memory usage with GHC 7.10.1

2015-04-03 Thread David Feuer
On a machine with an SSD instead of a hard disk, swapping greatly reduces the lifespan of the storage device. On Fri, Apr 3, 2015 at 10:14 AM, Bertram Felgenhauer bertram.felgenha...@googlemail.com wrote: George Colpitts wrote: I'm curious why the amount of RAM is relevant as all of our OS

Re: SIMD

2015-04-11 Thread David Feuer
Last I heard, it was extremely experimental and somewhat broken. Carter was working on some of the worst problems, but he's been kind of busy. On Sat, Apr 11, 2015 at 12:44 PM, Dominic Steinitz domi...@steinitz.org wrote: What’s the story with this? I tried to follow the instructions here:

Re: Arithmetic overflow in rem and mod

2015-06-01 Thread David Feuer
I think this is a mistake, yes. They should not raise such exceptions, but rather just wrap around—minBound `quot` (-1) should be -minBound=minBound. That would justify the behavior of rem and mod, and makes much more sense than the current behavior for Int as a ring. On Jun 1, 2015 12:41 PM,

Re: Typing pattern synonyms

2015-09-30 Thread David Feuer
The Eq constraint is needed to support pattern matching, the raison d’être of pattern synonyms. I'm pretty sure the reason you need ScopedTypeVariables for your second example is that GHC only allows pattern signatures with that extension enabled. Once upon a time there was a separate

Re: Feedback on -Wredundant-constraints

2016-06-06 Thread David Feuer
I strongly agree with per-declaration warning suppression. But I'd like to leave both warnings on by default in -Wall. 1. Sometimes an upstream library will drop a constraint. The warning lets me know I can drop it too. 2. Sometimes an implementation evolves from a draft that requires a

Re: Dropping bzip2 release tarballs?

2016-02-01 Thread David Feuer
Does this really strain storage infrastructure? There are only a few blobs per release. If that's really a problem, sufficiently ancient ones can presumably be pruned down to a single format without too many complaints (e.g., if someone wants GHC 7.6, they may not be able to have their choice of

Re: suboptimal ghc code generation in IO vs equivalent pure code case

2016-05-14 Thread David Feuer
The state token is zero-width and should therefore be erased altogether in code generation. On May 14, 2016 4:21 PM, "Tyson Whitehead" wrote: > On 14/05/16 02:31 PM, Harendra Kumar wrote: > >> The difference seems to be entirely due to memory pressure. At list size >> 1000

Re: suboptimal ghc code generation in IO vs equivalent pure code case

2016-05-14 Thread David Feuer
Well, a few weeks ago Bertram Felgenhauer came up with a version of IO that acts more like lazy ST. That could be just the thing. He placed it in the public domain/CC0 and told me I could put it up on Hackage if I want. I'll try to do that this week, but no promises. I could forward his email if

Re: Looking for GHC compile-time performance tests

2016-05-05 Thread David Feuer
containers compile times have generally gotten slower from version to version. On Thu, May 5, 2016 at 4:22 PM, Erik de Castro Lopo wrote: > Ben Gamari wrote: > >> So, if you would like to see your program's compilation time improve >> in GHC 8.2, put some time into reducing

Re: Proposal: ArgumentDo

2016-07-07 Thread David Feuer
What makes f do{x} do{y} any harder to read than similar record syntax? f Foo{foo=3} Foo{foo=4} On Thu, Jul 7, 2016 at 1:15 PM, Carter Schonwald wrote: > agreed -1, > ambiguity is bad for humans, not just parsers. > > perhaps most damningly, >> >> >> f do{ x } do {

Derived Functor instance for void types

2017-01-15 Thread David Feuer
he much more precise "Too many snozzcumbers!" I've opened Trac #13117 to fix this, but I figured I should double check that no one is opposed. David Feuer ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://mail.haskell.org/

Re: Rewrite rules

2017-01-16 Thread David Feuer
No. The part in quotes is the *name* of the rewrite rule, which is reported to the user when GHC is called with things like -ddump-rule-rewrites and is otherwise completely ignored. On Jan 16, 2017 4:09 AM, "Erik de Castro Lopo" wrote: Joachim Breitner wrote: > very

Re: GHC rewrite rules for class operations & laws

2016-11-17 Thread David Feuer
The containers package uses the awkward double name approach. See, for example, the way that Data.Map and Data.Sequence fuse (indexed) maps and indexed) traversals. I know that Edward Kmett is very much opposed to class-based rules as found in Control.Arrow because non-law-abiding instances will

Re: Narrower (per-method) GND

2017-01-09 Thread David Feuer
ood_enough_default join = (>>= id) This would allow users to just write newtype Foo a = Foo ... deriving Monad which would then be equivalent (using the notation you came up with) to instance Monad Foo where deriving newtype (>>=) David Feuer __

Re: Narrower (per-method) GND

2017-01-09 Thread David Feuer
On Mon, Jan 9, 2017 at 1:32 PM, Richard Eisenberg wrote: > I agree with David that using explicit `coerce`s can be quite verbose and > may need ScopedTypeVariables and InstanceSigs. But visible type application > should always work, because class methods always have a fixed

Re: Narrower (per-method) GND

2017-01-12 Thread David Feuer
the underlying implementation. If the class author doesn't make such a claim, I want users to have to be explicit about the methods derived by GND. On Jan 12, 2017 8:01 AM, "Reid Barton" <rwbar...@gmail.com> wrote: > On Mon, Jan 9, 2017 at 5:11 PM, David Feuer <david.

Narrower (per-method) GND

2017-01-08 Thread David Feuer
There are some situations where we may want to use GND to derive some class methods when it's not applicable to others. For example, some people would very much like to add a join method to Monad, but doing so would prevent GND from working for Monad. Similarly, the distribute method of

Re: Narrower (per-method) GND

2017-01-08 Thread David Feuer
e type argument order), things get even more verbose. On Jan 8, 2017 11:32 PM, "Joachim Breitner" <m...@joachim-breitner.de> wrote: > Hi, > > just responding to this one aspect: > > Am Sonntag, den 08.01.2017, 21:16 -0500 schrieb David Feuer: > > but using

Retro-Haskell: can we get seq somewhat under control?

2016-12-21 Thread David Feuer
em would be essentially unusable without it. 4. What would the language extension do, exactly? a. Automatically satisfy Seq for data types and families. b. Propagate Seq constraints using the usual rules and the special Coercible rule. c. Modify the translation of strict fields to add Seq const

Re: Retro-Haskell: can we get seq somewhat under control?

2016-12-21 Thread David Feuer
d, Dec 21, 2016 at 2:14 PM, Index Int <vlad.z.4...@gmail.com> wrote: > >> There's a related GHC Proposal: >> https://github.com/ghc-proposals/ghc-proposals/pull/27 >> >> On Wed, Dec 21, 2016 at 10:04 PM, David Feuer <david.fe...@gmail.com> >> wrote: >> &

Re: Derived Functor instance for void types

2017-01-15 Thread David Feuer
ry and evaluate a type with no > inhabitants. > > On Sun, Jan 15, 2017 at 2:37 PM, David Feuer <david.fe...@gmail.com> wrote: >> >> Currently, if you write >> >> data V a deriving Functor >> >> GHC generates >> >> fmap _ _ = error "

Re: DeriveFoldable treatment of tuples is surprising

2017-03-21 Thread David Feuer
onsistent. Is it more > consistent to treat tuples as transparent and consider every component with > type `a`, or is it more consistent to treat tuples as opaque and reuse the > existing Foldable instance for tuples even if it might cause a compile time > error? > > > On Tue, Mar

DeriveFoldable treatment of tuples is surprising

2017-03-21 Thread David Feuer
This seems much too weird: *> :set -XDeriveFoldable *> data Foo a = Foo ((a,a),a) deriving Foldable *> length ((1,1),1) 1 *> length $ Foo ((1,1),1) 3 I've opened Trac #13465 [*] for this. As I write there, I think the right thing is to refuse to derive Foldable for a type whose Foldable instance

Re: Contradictions about DeriveDataTypeable in the manual?

2017-06-26 Thread David Feuer
In the old days, DeriveDataTypeable enabled deriving both Data and Typeable. As of a fairly recent GHC version (7.10? 8.0?), Typeable instances are indeed derived automatically for all types that can get such instances, so DeriveDataTypeable is only used for deriving Data instances. I can't say

Re: GHC rewrite rule type-checking failure

2017-10-02 Thread David Feuer
I believe the answer is currently no. As I understand it, the entire instance resolution mechanism drops away after type checking and is therefore not available to the simplifier. So if you need to add a constraint on the RHS of a rule, I think you're mostly out of luck. The only thing I can think

Re: How to get a heap visualization

2017-08-31 Thread David Feuer
Have you gotten in touch with Joachim? I think he's touched that space in the not too murky past. On Aug 31, 2017 11:18 AM, "Yitzchak Gale" wrote: > I wrote: > >> I need a simple heap visualization for debugging purposes... > >> Vacuum... has some long-outstanding PRs against

Re: [was ghc-devs] Reasoning backwards with type families

2017-12-13 Thread David Feuer
I still haven't really digested what you've written, but I wish to pick a nit (below) On Nov 20, 2017 3:44 AM, "Anthony Clayden" <anthony_clay...@clear.net.nz> wrote: > On Thu Nov 16 01:31:55 UTC 2017, David Feuer wrote: ... > For (&&), the obvious things you'd wa

Re: Why is scanr strict in its third argument?

2017-11-09 Thread David Feuer
I think this discussion would be more appropriate to the libraries list. On Nov 9, 2017 11:05 AM, "Geraint Jones" wrote: > There are two things you might think of when you think of scanr; > or rather, there are two things I think of: a specification > >

Re: Natural number comparisons with evidence

2018-05-23 Thread David Feuer
I think the usual approach for defining these sorts of primitive operations is to use unsafeCoerce. On Wed, May 23, 2018, 7:39 PM Conal Elliott wrote: > When programming with GHC's type-level natural numbers and `KnownNat` > constraints, how can one construct *evidence* of the

Re: Natural number comparisons with evidence

2018-05-24 Thread David Feuer
alAt @ v of > > LT -> unsafeSatisfy @ (u < v) CompareLT > > EQ -> unsafeSatisfy @ (u ~ v) CompareEQ > > GT -> unsafeSatisfy @ (u > v) CompareGT > > If anyone has other techniques to suggest, I'd love to hear. > > --

Re: Open up the issues tracker on ghc-proposals

2018-05-02 Thread David Feuer
omes another backwater where ideas go to get ignored? > > > AntC > > >> >> | -Original Message- >> | From: Glasgow-haskell-users > | boun...@haskell.org> On Behalf Of Anthony Clayden >> | Sent: 02 May 2018 02:34 >> | To: glasgow-haske

unsafeCoerce shenanigans

2018-02-12 Thread David Feuer
Suppose I have a function of type unionWith# :: (Hashable k, Eq k) => (a -> a -> (# a #)) -> HashMap k a -> HashMap k a -> HashMap k a I can use this to implement strict and lazy unions with practically no code duplication either in source or in generated code: S.unionWith, L.unionWith ::

Re: GHC 8.4.1-rc1 is slower on a ray-tracer project

2018-02-28 Thread David Feuer
I don't see how 62 seconds rather than 60 is anything close to going off the rails. Did I read something wrong? This sounds more like a minor wibble. On Feb 28, 2018 10:32 AM, "Ben Gamari" wrote: > Vassil Ognyanov Keremidchiev writes: > > > Hello! > > > >

Re: [ANNOUNCE] GHC 8.4.4 released

2018-10-26 Thread David Feuer
On Fri, Oct 26, 2018 at 4:43 PM Carter Schonwald wrote: > > Hey David, i'm looking at the git history andit doesn't seem to have any > commits between 8.4.3 and 8.4.4 related to the dataToTag issue > > does any haskell code in the while trigger the bug on 8.4 series? I don't think anyone knows.

Typed hole improvements

2019-06-07 Thread David Feuer
I've been playing around with 8.6.3, and I've really been appreciating the improvements in typed hole messages. Both the information about constraints and the suggestions for filling the holes have proven valuable in heavily typish programming. Thanks! One thing that's still not where I'd like it

Re: `StablePtr` in `ST`

2019-08-20 Thread David Feuer
You also need to avoid inspecting the StablePtr itself, which is just a number, to maintain purity. The whole thing is a bit weird. Why do you want this anyway? On Wed, Aug 21, 2019, 7:39 AM David Feuer wrote: > So something like > > newtype StablePtr a = StablePtr (StablePtrST

Re: `StablePtr` in `ST`

2019-08-20 Thread David Feuer
So something like newtype StablePtr a = StablePtr (StablePtrST RealWorld a)? I suppose that could work with some discipline. You have to assume that foreign code doesn't pick its address out of a hat and so something silly, but I guess you pretty much have to assume that anyway. On Wed, Aug 21,

Does newByteArray clear?

2020-08-26 Thread David Feuer
I'm looking to play around with an array-based structure with sub-linear worst-case bounds. Array is pretty awkward in that context because creating a new one takes O(n) time to initialize it. Is that all true of newByteArray, or can I get one with arbitrary garbage in it for cheap?

What does freezing an array really do?

2020-08-20 Thread David Feuer
I know that a frozen array doesn't have to be searched for elements in a younger generation, but how does it differ from an unfrozen array that hasn't been mutated since the last collection? David ___ Glasgow-haskell-users mailing list

Re: What does freezing an array really do?

2020-08-20 Thread David Feuer
So I guess this is to avoid having to check the closure type on each mutation to see if the array needs to be added to the mutable list? On Thu, Aug 20, 2020, 6:12 PM Bertram Felgenhauer via Glasgow-haskell-users wrote: > David Feuer wrote: > > I know that a frozen array doe

Re: Does newByteArray clear?

2020-08-26 Thread David Feuer
f pointers, but that would require a new heap object type, which would be a lot to ask for. On Wed, Aug 26, 2020, 8:56 PM Bertram Felgenhauer via Glasgow-haskell-users wrote: > David Feuer wrote: > > I'm looking to play around with an array-based structure with > > sub-linear worst-cas

Re: [ANNOUNCE] Glasgow Haskell Compiler 9.0.1-alpha1 released

2020-09-29 Thread David Feuer
Will this be updated to the latest containers before release? It's two versions behind at the moment. On Mon, Sep 28, 2020, 3:14 PM Ben Gamari wrote: > Hello all, > > The GHC team is very pleased to announce the availability of the first > alpha release in the GHC 9.0 series. Source and binary

Language extension histories

2020-10-31 Thread David Feuer
I'm working on some code I want to be compatible with multiple GHC versions and I'm trying to figure out which language extensions I can reasonably use. I definitely need usable fancy pattern synonyms (not the bare-bones ones in 7.8). So that should set a lower bound, but I don't remember where.

Re: Language extension histories

2020-10-31 Thread David Feuer
agma-history > > PatternSynonyms was implemented in GHC 7.8, and TypeFamilyDependencies > was implemented in GHC 8.0. > > Regards, > Takenobu > > On Sun, Nov 1, 2020 at 2:08 AM David Feuer wrote: > > > > I'm working on some code I want to be compatible with multiple GHC > v

Re: How to user-define a type equality constraint?

2021-04-05 Thread David Feuer
`Char` is defined in user code. What you really can't define are Char# and TYPE, and you can't modify `RuntimeRep`. Speaking of `Char#`, I see that in 9.0, at least, it has kind TYPE 'WordRep. Why is that not Word32Rep? On Mon, Apr 5, 2021, 10:50 PM Richard Eisenberg wrote: > > > On Apr 1,

Re: [ANNOUNCE] GHC 9.2.1-rc1 now available

2021-08-22 Thread David Feuer
One more question: is Solo exported from Data.Tuple yet, or do we still have to depend on ghc-prim and import it from GHC.Magic? It would be really nice to have that fixed by release, and it's so tiny. On Sun, Aug 22, 2021, 6:01 PM Ben Gamari wrote: > > Hi all, > > The GHC developers are very

Re: [ANNOUNCE] GHC 9.2.1-rc1 now available

2021-08-22 Thread David Feuer
I mean GHC.Tuple, of course. On Sun, Aug 22, 2021, 8:14 PM David Feuer wrote: > One more question: is Solo exported from Data.Tuple yet, or do we still > have to depend on ghc-prim and import it from GHC.Magic? It would be really > nice to have that fixed by release, and it'

Re: [ANNOUNCE] GHC 9.2.1-rc1 now available

2021-08-22 Thread David Feuer
Have array and reference types and primos been updated to be BoxedRep-polymorphic, or is it still just expensive scaffolding? On Sun, Aug 22, 2021, 6:01 PM Ben Gamari wrote: > > Hi all, > > The GHC developers are very happy to announce the availability of the > release cadidate of the 9.2.1

Re: Was: [Haskell-cafe] Haskell reference documentation, laws first or laws last?

2021-09-19 Thread David Feuer
No, fromList is too much. Consider data Foo a = Foo (IORef String) [a] deriving Foldable What IORef should fromList use? On Sun, Sep 19, 2021, 2:44 AM Anthony Clayden wrote: > (Moving this discussion to glasgow-users. It's just not appropriate on the > cafe.) > > > > I am no longer a

Re: [Haskell-cafe] Bundle patterns with type aliases

2021-09-16 Thread David Feuer
ng what and why you want it on > a ghc ticket! > > On Wed, Sep 8, 2021 at 1:25 PM David Feuer wrote: > >> I would like that, along with the ability to bundle patterns with classes. >> >> On Wed, Sep 8, 2021, 1:13 PM Keith wrote: >> >>> Is there currently a w

Re: [Haskell-cafe] Bundle patterns with type aliases

2021-09-16 Thread David Feuer
p > -1 is making up 1-2 toy examples and explaining what and why you want it on > a ghc ticket! > > On Wed, Sep 8, 2021 at 1:25 PM David Feuer wrote: > >> I would like that, along with the ability to bundle patterns with classes. >> >> On Wed, Sep 8, 2021, 1:13 P

Re: InstanceSigs -- rationale for the "must be more polymorphic than"

2021-08-10 Thread David Feuer
; better, that would be great. > > > > Simon > > > > *From:* Glasgow-haskell-users *On > Behalf Of *David Feuer > *Sent:* 08 August 2021 09:37 > *To:* Anthony Clayden > *Cc:* GHC users > *Subject:* Re: InstanceSigs -- rationale for the "must be more >

Re: InstanceSigs -- rationale for the "must be more polymorphic than"

2021-08-08 Thread David Feuer
To the best of my knowledge, `InstanceSigs` are never strictly necessary. They can, however, be useful for at least four purposes: 1. To provide a compiler-checked reminder of the type. 2. To bind type variables with `ScopedTypeVariables`. 3. To generalize the type so you can use polymorphic

Re: InstanceSigs -- rationale for the "must be more polymorphic than"

2021-08-10 Thread David Feuer
** > instance till much later. So I still don’t get it. An example would > clear it up. > > > > Simon > > > > *From:* David Feuer > *Sent:* 10 August 2021 12:01 > *To:* Simon Peyton Jones > *Cc:* Anthony Clayden ; GHC users < > glasgow-haskel

Re: Pattern synonym constraints :: Ord a => () => ...

2021-10-05 Thread David Feuer
To be clear, the proposal to allow different constraints was accepted, but integrating it into the current, incredibly complex, code was well beyond the limited abilities of the one person who made an attempt. Totally severing pattern synonyms from constructor synonyms (giving them separate

Re: Pattern synonym constraints :: Ord a => () => ...

2021-10-05 Thread David Feuer
ard Kmett wrote: > > > On Tue, Oct 5, 2021 at 12:39 PM David Feuer wrote: > >> To be clear, the proposal to allow different constraints was accepted, >> but integrating it into the current, incredibly complex, code was well >> beyond the limited abilities of the one pe

Re: Are constructors matched against using "switch" or chained if-else

2022-02-22 Thread David Feuer
s an if/else chain in order of the constructor definition > regardless of the order of the case statement so the higher up the list the > better? > > On Wed, Feb 23, 2022 at 1:34 PM David Feuer wrote: >> >> I can answer one of your questions for sure: the order of your cas

Re: Are constructors matched against using "switch" or chained if-else

2022-02-22 Thread David Feuer
; of constructors, which are a dense set? > > > On Wed, Feb 23, 2022 at 1:59 PM David Feuer wrote: > >> You can ask, but someone else will have to answer. Sorry. >> >> On Tue, Feb 22, 2022 at 9:52 PM Clinton Mead >> wrote: >> > >> > Thanks David

Re: Are constructors matched against using "switch" or chained if-else

2022-02-22 Thread David Feuer
I can answer one of your questions for sure: the order of your case branches doesn't matter at all. However, the order of the data constructors in the type declaration does matter. Put your most likely one first. On Tue, Feb 22, 2022, 9:09 PM Clinton Mead wrote: > Hi All > > I'm developing an

Re: [Haskell] [ANNOUNCE] GHC 9.0.2 released

2022-01-22 Thread David Feuer
Could you explain what you mean about the containers source not being "clean"? On Sun, Jan 23, 2022, 2:31 AM Jens Petersen wrote: > First of all a big thank you and congratulations on the highly anticipated > 9.0.2 release. > > I have been putting off this mail for a while: > I actually built

Re: [Haskell] [ANNOUNCE] GHC 9.0.2 released

2022-01-23 Thread David Feuer
There's no such directory in the Hackage or GitHub source. I guess it must have crept in on the GHC side? On Sun, Jan 23, 2022, 4:13 AM Jens Petersen wrote: > On Sun, 23 Jan 2022 at 15:40, David Feuer wrote: > >> Could you explain what you mean about the containers source not bei

Re: [Haskell-cafe] [ANNOUNCE] GHC 9.4.4 is now available

2022-12-24 Thread David Feuer
Excellent! On Sat, Dec 24, 2022, 10:29 PM Ben Gamari wrote: > David Feuer writes: > > > Does this release include the fix for #22549 (infinite loops for some > > undecidable instances)? > > > Yes, it includes a backport of !

Re: [ANNOUNCE] GHC 9.4.4 is now available

2022-12-24 Thread David Feuer
Does this release include the fix for #22549 (infinite loops for some undecidable instances)? On Sat, Dec 24, 2022, 5:36 PM Ben Gamari wrote: > The GHC developers are happy to announce the availability of GHC 9.4.4. > Binary > distributions, source distributions, and documentation are available

Re: How to fool the divergence checker in ghc 9

2023-01-20 Thread David Feuer
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

Re: How to fool the divergence checker in ghc 9

2023-01-20 Thread David Feuer
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'

Re: How to fool the divergence checker in ghc 9

2023-01-20 Thread David Feuer
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'