Re: Why aren't classes like "Num" levity polymorphic?

2022-05-09 Thread Edward Kmett
Another, weaker version of this is to just require default signatures that assume r has type LiftedRep for each of the defaults, but then instantiating things at obscure kinds becomes _much_ harder. -Edward On Mon, May 9, 2022 at 12:30 PM Edward Kmett wrote: > Also, if you do w

Re: Why aren't classes like "Num" levity polymorphic?

2022-05-09 Thread Edward Kmett
also use the new UnliftedDataTypes and/or UnliftedNewtypes to do things like pass around a Natural# that is stored in a couple of registers and then build support for it. This is also included in that repo above. -Edward On Mon, May 9, 2022 at 12:24 PM Edward Kmett wrote: > It is rat

Re: Why aren't classes like "Num" levity polymorphic?

2022-05-09 Thread Edward Kmett
It is rather shockingly difficult to get it to work out because of the default definitions in each class. Consider just class Eq (a :: TYPE r) where (==), (/=) :: a -> a -> Bool That looks good until you remember that x == y = not (x /= y) x /= y = not (x == y) are also included in the

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

2021-10-05 Thread Edward Kmett
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 person who made an attempt. Totally > severing pattern

Re: Local types and instances

2018-04-29 Thread Edward Kmett
This isn't sound. You lose the global uniqueness of instance resolution, which is a key part of how libraries like Data.Set and Data.Map move the constraints from being carried around in the Set to the actual use sites. With "local" instances it is very easy to construct such a map in one

Re: [Haskell] LiftA2 over fmap

2018-01-30 Thread Edward Kmett
> In particular, if fmap is an expensive operation, it is likely better to use liftA2 than to (fmap

Re: Rewrite rules involving LHS lambda?

2017-12-02 Thread Edward Kmett
I don't knw of a formal writeup anywhere. But does that actually mean what you are trying to write? With the effective placement of "forall" quantifiers on the outside for u and v I'd assume that x didn't occur in either u or v. Effectively you have some scope like forall u v. exists x. ...

Re: Remove eq and show from num class

2017-09-10 Thread Edward Kmett
On Sun, Sep 10, 2017 at 4:48 AM, Anthony Clayden < anthony_clay...@clear.net.nz> wrote: > > On Fri Sep 8 15:58:10 UTC 2017, Carter Schonwald wrote: > > > > I mostly wanted to confirm that we in fact will actually > say yes > > before doing the formal writtingup :) > > Seriously -- and please stop

Re: type (++) = (<>)

2017-07-03 Thread Edward Kmett
Note: I realize nobody is directly saying that we should use (++) instead of (<>) in this conversation just yet, but I want to clear a few things up. One of the early options when the operator (<>) was coined was to try to say we should just generalize the type of (++) instead to make it mappend.

Re: DeriveFoldable treatment of tuples is surprising

2017-03-21 Thread Edward Kmett
As I recall, Richard Eisenberg has been pushing, off and on, for us to get a better vocabulary to specify "how" something is derived, via DeriveAnyClass, generalized newtype deriving, DeriveFoldable, etc. In general I think the current behavior is the least surprising as it "walks all the a's it

Re: Derived Functor instance for void types

2017-01-15 Thread Edward Kmett
"Preserving user bottoms" was found to be better behavior for us with Void as well back in the day. Evaluating such a term to get the bottom out is better than making up one that loses information for the user about precisely what bottom it is they had. We do so with absurd and the like for Void.

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

2016-12-21 Thread Edward Kmett
Actually, if you go back to the original form of Seq it would translate to data Seq a => Foo a = Foo !Int !a which requires resurrecting DatatypeContexts, and not data Foo a = Seq a => Foo !Int !a The former requires Seq to call the constructor, but doesn't pack the dictionary into the

Re: Anything happening?

2016-07-20 Thread Edward Kmett
I'll be at Zurihac as well should you need input from the CLC side. Sent from my iPhone > On Jul 20, 2016, at 5:20 PM, David Luposchainsky via Haskell-prime > wrote: > >> On 19.07.2016 20:08, Michael Walker wrote: >> I haven't seen anything on this mailing list for

[Haskell] Summer of Haskell Mentors

2016-05-09 Thread Edward Kmett
If you are interesting in helping out as a possible mentor for this year's Summer of Haskell, please email me, and include MENTOR in the title. Thank you! -Edward ___ Haskell mailing list Haskell@haskell.org

Re: Looking for GHC compile-time performance tests

2016-05-05 Thread Edward Kmett
vector-algorithms has gotten slower to both compile and for users rather consistently during each release throughout the 7.x lifecycle. That may serve as a good torture test as well. > On May 6, 2016, at 6:22 AM, Erik de Castro Lopo wrote: > > Ben Gamari wrote: > >> So,

[Haskell] Haskell Summer of Code

2016-02-29 Thread Edward Kmett
out the details. Please feel free to contact me if you think you can help or if you have any questions or concerns. -Edward Kmett ___ Haskell mailing list Haskell@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell

Re: suppress warning "Defined but not used: type variable ‘x’" in GHC-8.0

2016-01-17 Thread Edward Kmett
gt; (At least I think I did that somewhere...) > On Jan 16, 2016 9:24 PM, "Edward Kmett" <ekm...@gmail.com> wrote: > >> As a data point I now get thousands of occurrences of this warning across >> my packages. >> >> It is quite annoying. >>

Re: suppress warning "Defined but not used: type variable ‘x’" in GHC-8.0

2016-01-17 Thread Edward Kmett
Moreover those _'d type variables would infect all of our haddocks. ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users

Re: suppress warning "Defined but not used: type variable ‘x’" in GHC-8.0

2016-01-16 Thread Edward Kmett
As a data point I now get thousands of occurrences of this warning across my packages. It is quite annoying. class Foo a where type Bar a instance Foo [a] where type Bar [a] = Int is enough to trigger it. And you can't turn it off by using _ as instance Foo [_] where type Bar [_] = Int

Re: Breaking Changes and Long Term Support Haskell

2015-10-22 Thread Edward Kmett
On Wed, Oct 21, 2015 at 8:42 PM, Gregory Collins wrote: > > On Wed, Oct 21, 2015 at 3:18 PM, Geoffrey Mainland > wrote: > >> My original email stated my underlying concern: we are losing valuable >> members of the community not because of the

Re: Breaking Changes and Long Term Support Haskell

2015-10-22 Thread Edward Kmett
On Thu, Oct 22, 2015 at 2:04 AM, Taru Karttunen wrote: > E.g. if > > A) Most of Hackage (including dependencies) compiles with new GHC. > (stack & stackage helps somewhat) > > B) There is an automated tool that can be used to fix most code > to compile with new versions of GHC

Re: Breaking Changes and Long Term Support Haskell

2015-10-22 Thread Edward Kmett
On Thu, Oct 22, 2015 at 1:37 PM, Gregory Collins <g...@gregorycollins.net> wrote: > > On Wed, Oct 21, 2015 at 11:40 PM, Edward Kmett <ekm...@gmail.com> wrote: > >> All I'm saying is that if we want to appeal to or cater to working >>> software engineers, we

Re: Breaking Changes and Long Term Support Haskell

2015-10-22 Thread Edward Kmett
all the process indefinitely by raising objections of this form. Such a situation is not without costs all its own. -Edward > Cheers, > Geoff > > > > > On Thu, Oct 22, 2015 at 3:29 PM, Geoffrey Mainland <mainl...@apeiron.net> > wrote: > >

Re: Breaking Changes and Long Term Support Haskell

2015-10-22 Thread Edward Kmett
On Thu, Oct 22, 2015 at 12:20 PM, Mario Blažević wrote: > On 15-10-22 09:29 AM, Geoffrey Mainland wrote: > >> ... >> >> 1) What is the master plan, and where is it documented, even if this >> document is not up to the standard of a proposal? What is the final >> target, and

Re: [Haskell-cafe] Committee M.O. Change Proposals

2015-10-21 Thread Edward Kmett
The committee was formed from a pool of suggestions supplied to SPJ that represented a fairly wide cross-section of the community. Simon initially offered both myself and Johan Tibell the role of co-chairs. Johan ultimately declined. In the end, putting perhaps too simple a spin on it, the

Re: [Haskell-cafe] MRP, 3-year-support-window, and the non-requirement of CPP

2015-10-10 Thread Edward Kmett
On Wed, Oct 7, 2015 at 3:35 AM, Herbert Valerio Riedel wrote: > --8<---cut here---start->8--- > import Control.Applicative as A (Applicative(..)) > > data Maybe' a = Nothing' | Just' a > > instance Functor Maybe' where > fmap f (Just' v) =

Re: [Haskell-cafe] MRP, 3-year-support-window, and the non-requirement of CPP

2015-10-10 Thread Edward Kmett
On Tue, Oct 6, 2015 at 3:02 PM, Malcolm Wallace wrote: > > On 6 Oct 2015, at 17:47, Herbert Valerio Riedel wrote: > > At the risk of stating the obvious: I don't think it matters from which > > group a given argument comes from as its validity doesn't depend on the > >

Re: [Haskell-cafe] MRP, 3-year-support-window, and the non-requirement of CPP

2015-10-10 Thread Edward Kmett
The part of the MRP proposal that I actively care about because it fixes a situation that *actually causes harm* is moving (>>) to the top level. Why? Right now (*>) and (>>) have different default definitions. This means that code runs often with different asymptotics depending on which one you

Re: [Haskell-cafe] MRP, 3-year-support-window, and the non-requirement of CPP

2015-10-10 Thread Edward Kmett
On Tue, Oct 6, 2015 at 1:41 PM, Sven Panne wrote: > 2015-10-06 18:47 GMT+02:00 Herbert Valerio Riedel : > >> [...] That's because -Wall-hygiene (w/o opting out of harmless) warnings >> > across multiple GHC versions is not considered a show-stopper. >> > >

Re: [Haskell-cafe] MRP, 3-year-support-window, and the non-requirement of CPP

2015-10-10 Thread Edward Kmett
On Sat, Oct 10, 2015 at 4:12 PM, Yuras Shumovich <shumovi...@gmail.com> wrote: > On Sat, 2015-10-10 at 15:25 -0400, Edward Kmett wrote: > > The part of the MRP proposal that I actively care about because it > > fixes a > > situation that *actually causes harm* is movin

Re: -Wall and the fail method

2015-05-22 Thread Edward Kmett
It probably doesn't belong in -Wall, as it is a fairly common idiom to use fail intentionally this way, but it could pretty easily be added to the 'do' and list/monad comprehension desugaring to issue a separate warning that we don't turn on by default. Making it possible to see where you use

[Haskell] [haskell.org Google Summer of Code] Call for Mentors

2015-04-06 Thread Edward Kmett
also have a #haskell-gsoc channel on irc.freenode.net if you have questions about what is involved. Thank you for your time and consideration, -Edward Kmett ___ Haskell mailing list Haskell@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo

Re: Qualified names in TH?

2015-03-16 Thread Edward Kmett
Using {-# LANGUAGE TemplateHaskell #-} you can use 'foo and ''Foo to get access to the names in scope in the module that is building the splice, rather than worrying about what names are in scope in the module the code gets spliced into. -Edward On Mon, Mar 16, 2015 at 10:54 PM, J. Garrett

Re: GHC 7.10 regression when using foldr

2015-01-20 Thread Edward Kmett
There is a limited set of situations where the new signatures can fail to infer, where it would infer before. This can happen when you construct a Foldable/Traversable value using polymorphic tools (like Read) that were previously instantiated for list, but where since foldr et al. are now

Re: GHC 7.10 regression when using foldr

2015-01-20 Thread Edward Kmett
On Tue, Jan 20, 2015 at 9:00 AM, Kim-Ee Yeoh k...@atamo.com wrote: There are few reports because the change hasn't affected the dark majority yet. RC builds are used by a tiny fraction. There's a long tail of users still on 7.6, 7.4, 7.2, and 6.x. We've been actively testing since the

Re: GHC 7.10 regression when using foldr

2015-01-20 Thread Edward Kmett
I was assuming that the list was generated by doing more or less the same check we do now. I haven't looked at the code for it. If so, then it seems it wouldn't flag a now-unnecessary Data.Traversable dependency for instance. At least not without rather significant retooling. I might be off in

Re: GHC 7.10 regression when using foldr

2015-01-20 Thread Edward Kmett
It isn't without a cost. On the down-side, the results of -ddump-minimal-imports would be er.. less minimal. On Tue, Jan 20, 2015 at 6:47 PM, Edward Z. Yang ezy...@mit.edu wrote: I like this proposal: if you're explicit about an import that would otherwise be implicit by Prelude, you

Re: GHC 7.10 regression when using foldr

2015-01-20 Thread Edward Kmett
Sure. Adding it to the CHANGELOG makes a lot of sense. I first found out about it only a few weeks ago when Herbert mentioned it in passing. Of course, the geek in me definitely prefers technical fixes to human ones. Humans are messy. =) I'd be curious how much of the current suite of warnings

Re: GHC 7.10 regression when using foldr

2015-01-20 Thread Edward Kmett
Building -Wall clean across this change-over has a big of a trick to it. The easiest way I know of when folks already had lots of import Data.Foldable import Data.Traversable stuff is to just add import Prelude explicitly to the bottom of your import list rather than painstakingly exclude

Re: Found hole

2015-01-20 Thread Edward Kmett
FWIW- you can think of a 'hole' as a not in scope error with a ton of useful information about the type such a term would have to have in order to go in the location you referenced it. This promotes a very useful style of type-driven development that is common in Agda, where you write out your

Re: Equality Constraints (a ~ b)

2015-01-11 Thread Edward Kmett
They were introduced as part of the System Fc rewrite. The Fc approach has the benefit of unifying a lot of the work on GADTs, functional dependencies, type and data families, etc. all behind the scenes. Every once in a while, (~) constraints can leak into the surface language and it can be

Re: Permitting trailing commas for record syntax ADT declarations

2014-09-29 Thread Edward Kmett
Not a concrete suggestion, but just a related data point / nod to the sanity of the suggestion: I'm not sure I'd remove them entirely either, but FWIW, we don't require commas in fixity declarations in Ermine and it works well. On the other hand, our import lists are rather more complicated than

[Haskell] CUFP 2014: Call For Participation

2014-08-18 Thread Edward Kmett
Development without Frameworks (Part 2) Spiros Eliopoulos T5: Idris: Practical Software Verification with Dependent Types Edwin Brady T6: Lens Edward Kmett TUTORIALS, SEPTEMBER 5 == T7: Introduction to OCaml Leo White Jeremy Yallop T8: Programming in Rust Felix Klock Lars

Proposal: Treat OtherLetter as lower case in the grammar

2014-08-12 Thread Edward Kmett
bringing it up to Haskell' but here we are 6 years later. -Edward Kmett ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org/mailman/listinfo/haskell-prime

Re: Old code broken by new Typeable class

2014-08-05 Thread Edward Kmett
If you can't change the definition you can use the syntax Björn Bringert added back in 2006 or so for StandaloneDeriving. Just turn on {-# LANGUAGE StandaloneDeriving, DeriveDataTypeable #-} and then you can use deriving instance Typeable Foo -Edward On Tue, Aug 5, 2014 at 1:47 PM, Volker

Re: Overlapping and incoherent instances

2014-07-31 Thread Edward Kmett
Now if only we could somehow find a way to do the same thing for AllowAmbiguousTypes. :) I have a 2500 line file that I'm forced to turn on AllowAmbiguousTypes in for 3 definitions, and checking that I didn't accidentally make something else ambiguous to GHC's eyes is a rather brutal affair. (I

Re: Monomorphizing GHC Core?

2014-06-19 Thread Edward Kmett
Might you have more success with a Reynolds style defunctionalization pass for the polymorphic recursion you can't eliminate? Then you wouldn't have to rule out things like data Complete a = S (Complete (a,a)) | Z a which don't pass that test. -Edward On Thu, Jun 19, 2014 at 3:28 PM, Conal

Re: Monomorphizing GHC Core?

2014-06-19 Thread Edward Kmett
On Thu, Jun 19, 2014 at 1:22 PM, Edward Kmett ekm...@gmail.com wrote: Might you have more success with a Reynolds style defunctionalization pass for the polymorphic recursion you can't eliminate? Then you wouldn't have to rule out things like data Complete a = S (Complete (a,a)) | Z a which

[Haskell] Core libraries committee seeking self-nominations

2014-06-03 Thread Edward Kmett
participation in the GHC release process. Regards, Edward Kmett Haskell Core Libraries Committee Chair ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [core libraries] Re: Tightening up on inferred type signatures

2014-04-30 Thread Edward Kmett
without extra imports, just to avoid cluttering the namespace. -Edward On Wed, Apr 30, 2014 at 2:10 AM, Ganesh Sittampalam gan...@earth.li wrote: On 23/04/2014 20:04, dm-list-haskell-librar...@scs.stanford.edu wrote: Edward Kmett ekm...@gmail.com writes: You can wind up in perfectly

Re: [core libraries] Re: Tightening up on inferred type signatures

2014-04-30 Thread Edward Kmett
Er.. my mistake. Control.Applicative. That is what it is we don't re-export that is used in Traversal. =) On Wed, Apr 30, 2014 at 2:47 AM, Edward Kmett ekm...@gmail.com wrote: Not sure. An even simpler case is something like exporting a Traversal but not exporting Data.Traversable, which

Re: RFC: changes to -i flag for finding source files

2014-04-25 Thread Edward Kmett
+1 from me. I have a lot of projects that suffer with 4 levels of vacuous subdirectories just for this. In theory cabal could support this on older GHC versions by copying all of the files to a working dir in dist with the expected layout on older GHCs. That would enable this to get much

Re: RFC: changes to -i flag for finding source files

2014-04-25 Thread Edward Kmett
25, 2014, at 12:01 PM, Felipe Lessa felipe.le...@gmail.com wrote: Em 25-04-2014 12:22, Edward Kmett escreveu: +1 from me. I have a lot of projects that suffer with 4 levels of vacuous subdirectories just for this. In theory cabal could support this on older GHC versions by copying all

Re: RFC: changes to -i flag for finding source files

2014-04-25 Thread Edward Kmett
You can actually make symbolic links (as well as hard links and directory junctions) on windows. -Edward On Apr 25, 2014, at 12:51 PM, Roman Cheplyaka r...@ro-che.info wrote: * Felipe Lessa felipe.le...@gmail.com [2014-04-25 13:01:43-0300] Em 25-04-2014 12:22, Edward Kmett escreveu: +1

Re: [core libraries] Re: Tightening up on inferred type signatures

2014-04-23 Thread Edward Kmett
You can wind up in perfectly legitimate situations where the name for the type you are working with isn't in scope, but where you can write a combinator that would infer to have that type. I'd hate to lose that. It is admittedly of marginal utility at first glance, but there are some tricks that

Re: [core libraries] Tightening up on inferred type signatures

2014-04-21 Thread Edward Kmett
No objections here. The types involved really *do* have FlexibleContexts in them, so it makes sense to require the extension. The upgrade path for library authors is also clear. It'll complain to add the extension, and they'll fix it by adding the line of code suggested and perhaps realize

[Haskell] [Haskell.org GSoC] Accepted Proposals

2014-04-21 Thread Edward Kmett
An Efficient Computational Algebra and Symbolic Linear Algebra Library in Haskell Hiromi ISHII Edward Kmett Complete plugins-ng low-level, filewatch, and cabal packages Kẏra Greg Weber Build Interactive Websites with GHCJS and Sodium Kyle Raftogianis Luite Stegeman Pandoc improvements: Embedded

Re: [Haskell] [Haskell.org GSoC] Accepted Proposals

2014-04-21 Thread Edward Kmett
2014 06:56, Edward Kmett ekm...@gmail.com wrote: I'm pleased to announce the list of accepted student proposals for haskell.org for the Google Summer of Code 2014. Title Student Mentor Adding profiling support to GHCJS -- JavaScript backend for GHC Ömer Sinan Aǧacan Luite Stegeman

[Haskell] CUFP 2014: Call for Presentations

2014-04-20 Thread Edward Kmett
. Program Committee = Edward Kmett (McGraw Hill Financial), co-chair Marius Eriksen (Twitter, Inc.), co-chair Ozgun Ataman (Soostone, Inc.) Tim Chevalier (AlephCloud) Derek Elkins (Now Business Intelligence) Matthew Might (University of Utah) Richard Minerich

Re: Proposal - Foreign enum support

2014-04-19 Thread Edward Kmett
-1 from me. Your first example even provides a counter-example. typedef enum { IMG_INIT_JPG = 0x0001, IMG_INIT_PNG = 0x0002, IMG_INIT_TIF = 0x0004, IMG_INIT_WEBP = 0x0008 } IMG_InitFlags; Those are defined as powers of two because

Re: [Haskell-cafe] Eta Reduction

2014-04-01 Thread Edward Kmett
John, Check the date and consider the process necessary to enumerate all Haskell programs and check their types. -Edward On Tue, Apr 1, 2014 at 9:17 AM, John Lato jwl...@gmail.com wrote: I think this is a great idea and should become a top priority. I would probably start by switching to a

Re: [Haskell-cafe] Eta Reduction

2014-04-01 Thread Edward Kmett
that on a different day, +1 from me. John On Apr 1, 2014 10:32 AM, Edward Kmett ekm...@gmail.com wrote: John, Check the date and consider the process necessary to enumerate all Haskell programs and check their types. -Edward On Tue, Apr 1, 2014 at 9:17 AM, John Lato jwl...@gmail.com wrote: I

Re: PROPOSAL: Literate haskell and module file names

2014-03-17 Thread Edward Kmett
. Patching tools to support whatever solution we pick should be trivial. Cheers, Merijn On Mar 16, 2014, at 16:41 , Edward Kmett wrote: One problem with Foo.*.hs or even Foo.md.hs mapping to the module name Foois that as I recall JHC will look for Data.Vector in Data.Vector.hs as well as Data

Re: PROPOSAL: Literate haskell and module file names

2014-03-17 Thread Edward Kmett
. Patching tools to support whatever solution we pick should be trivial. Cheers, Merijn On Mar 16, 2014, at 16:41 , Edward Kmett wrote: One problem with Foo.*.hs or even Foo.md.hs mapping to the module name Foois that as I recall JHC will look for Data.Vector in Data.Vector.hs as well as Data

Re: PROPOSAL: Literate haskell and module file names

2014-03-16 Thread Edward Kmett
One problem with Foo.*.hs or even Foo.md.hs mapping to the module name Foois that as I recall JHC will look for Data.Vector in Data.Vector.hs as well as Data/Vector.hs This means that on a case insensitive file system Foo.MD.hs matches both conventions. Do I want to block an change to GHC

Re: Safe Haskell trust

2014-03-16 Thread Edward Kmett
Not directly. You can, however, make a Trustworthy module that re-exports the (parts of) the Unsafe ones you want to allow yourself to use. -Edward On Sun, Mar 16, 2014 at 12:57 PM, Fabian Bergmark fabian.bergm...@gmail.com wrote: Im using the Hint library in a project where users are able

Re: PROPOSAL: Literate haskell and module file names

2014-03-16 Thread Edward Kmett
One problem with Foo.*.hs or even Foo.md.hs mapping to the module name Foois that as I recall JHC will look for Data.Vector in Data.Vector.hs as well as Data/Vector.hs This means that on a case insensitive file system Foo.MD.hs matches both conventions. Do I want to block an change to GHC

Re: [Haskell] Google Summer of Code | Haskell.org

2014-02-10 Thread Edward Kmett
That is the plan. We won't know officially until Google gets back to us about our org application in a couple of weeks. -Edward On Mon, Feb 10, 2014 at 8:08 AM, Narendra Joshi narendr...@gmail.comwrote: Hi there! Is haskell.org participating in this year's GSoC? -- narendra

Re: Enabling TypeHoles by default

2014-01-14 Thread Edward Kmett
It actually can affect what code compiles with -fdefer-type-errors, but I don't feel terribly strongly about that. -Edward On Tue, Jan 14, 2014 at 12:23 PM, Joachim Breitner m...@joachim-breitner.de wrote: Hi, heh, I wanted to throw in the same argument: If its just more elaborate error

Re: Enabling TypeHoles by default

2014-01-13 Thread Edward Kmett
I have to admit, I rather like this suggestion. -Edward On Mon, Jan 13, 2014 at 1:42 PM, Krzysztof Gogolewski krz.gogolew...@gmail.com wrote: Hello, As discussed on ghc-devs, I propose to enable -XTypeHoles in GHC by default. Rationale: (1) This way holes are far easier to use; just

Re: Enabling TypeHoles by default

2014-01-13 Thread Edward Kmett
Heck if we wanted to bikeshed the name, even 'Holes' would do. ;) On Mon, Jan 13, 2014 at 4:30 PM, Daniil Frumin difru...@gmail.com wrote: On ghc-dev Dominique Devriese has actually proposed changing TypeHoles to TypedHoles or to something similar, because TypeHoles sounds like you can have

Re: Why cannot inferred type signatures restrict (potentially) ambiguous type variables?

2013-10-14 Thread Edward Kmett
AllowAmbiguousTypes at this point only extends to signatures that are explicitly written. This would need a new AllowInferredAmbiguousTypes or something. On Sat, Oct 12, 2013 at 5:34 PM, adam vogt vogt.a...@gmail.com wrote: Hello, I have code: {-# LANGUAGE FlexibleInstances,

Re: [Haskell-cafe] Conditional lens

2013-10-10 Thread Edward Kmett
`ifL` isn't a legal lens for several reasons. Lens s t a b generally requires that the types a subsumes b and b subsumes a, and that s subsumes t and t subsumes s. Lens s (Maybe t) (Maybe a) b is a huge red flag. There is an 'illegal prism' provided by lens that is a more principled version of

Re: default roles

2013-10-09 Thread Edward Kmett
I just noticed there is a pretty big issue with the current default role where typeclasses are concerned! When implementing Data.Type.Coercion I had to use the fact that I could apply coerce to the arguments of data Coercion a b where Coercion :: Coercible a b = Coercion a b This makes sense

Re: default roles

2013-10-09 Thread Edward Kmett
role be nominal? Richard On Oct 9, 2013, at 1:55 PM, Edward Kmett ekm...@gmail.com wrote: I just noticed there is a pretty big issue with the current default role where typeclasses are concerned! When implementing Data.Type.Coercion I had to use the fact that I could apply coerce

Re: default roles

2013-10-09 Thread Edward Kmett
On Wed, Oct 9, 2013 at 3:21 PM, Richard Eisenberg e...@cis.upenn.edu wrote: Now I think we're on the same page, and I *am* a little worried about the sky falling because of this. (That's not a euphemism -- I'm only a little worried.) =) Wait! I have an idea! The way I've been describing

Re: default roles

2013-10-09 Thread Edward Kmett
to be coerced. On Oct 9, 2013, at 2:52 PM, Edward Kmett ekm...@gmail.com wrote: I'd be happy to be wrong. =) We do seem to have stumbled into a design paradox though. To make it so you can use roles in GeneralizedNewtypeDeriving hinges on the parameter's role being representational, but making

Re: Desugaring do-notation to Applicative

2013-10-02 Thread Edward Kmett
That is admittedly a pretty convincing example that we may want to provide either a LANGUAGE pragma or a different syntax to opt in. As a data point in this space, the version of the code I have in scheme calls the version of 'do' that permits applicative desugaring 'ado'. A port of it to Haskell

Re: [Haskell-cafe] Proposal: Partitionable goes somewhere + containers instances

2013-09-30 Thread Edward Kmett
On Sun, Sep 29, 2013 at 8:20 AM, Edward Kmett ekm...@gmail.com wrote: I don't know that it belongs in the standard libraries, but there could definitely be a package for something similar. ConstraintKinds are a pretty hefty extension to throw at it, and the signature written

Re: [Haskell-cafe] Proposal: Partitionable goes somewhere + containers instances

2013-09-29 Thread Edward Kmett
I don't know that it belongs in the standard libraries, but there could definitely be a package for something similar. ConstraintKinds are a pretty hefty extension to throw at it, and the signature written there prevents it from being used on ByteString, Text, etc. This can be implemented with

Re: [Haskell-cafe] Impredicative types and Lens?

2013-09-08 Thread Edward Kmett
You can't write that lens by hand, so it isn't surprising that the template haskell can't generate it either. =) ImpredicativeTypes don't work all that well. -Edward On Sun, Sep 8, 2013 at 9:49 AM, Artyom Kazak y...@artyom.me wrote: Here’s a small example, which, when compiled, gives an

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-31 Thread Edward Kmett
Or fmap in this case =) On Wed, Jul 31, 2013 at 11:33 AM, Erik Hesselink hessel...@gmail.comwrote: On Fri, Jul 26, 2013 at 6:44 PM, Andreas Abel andreas.a...@ifi.lmu.de wrote: mapSnd f = (id *** f) As a very small aside, this is just `second` from Control.Arrow. Erik

Re: Liberalising IncoherentInstances

2013-07-29 Thread Edward Kmett
I'll probably never use it, but I can't see any real problems with the proposal. In many ways it is what I always expected IncoherentInstances to be. One thing you might consider is that if you have to make an arbitrary instance selection at the end during compile time, making that emit a warning

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-25 Thread Edward Kmett
I'm just going to say that I'd rather we didn't resort to calling each others trolls. I happen to disagree with Oleg on this particular issue and find that it is better resolved by just using -Wall or a 2-line combinator, but I find that across the breadth and depth of issues in the Haskell

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-24 Thread Edward Kmett
is a lazy constructor. On 22.07.13 4:54 PM, Edward Kmett wrote: let x = x +1 is perfectly cromulent when x is sufficiently lazy, e.g. in the one point compactification of the naturals: data Conat = S Conat | Z There it represents infinity with proper sharing. -Edward On Jul 22, 2013

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-22 Thread Edward Kmett
let x = x +1 is perfectly cromulent when x is sufficiently lazy, e.g. in the one point compactification of the naturals: data Conat = S Conat | Z There it represents infinity with proper sharing. -Edward On Jul 22, 2013, at 10:24 AM, Andreas Abel andreas.a...@ifi.lmu.de wrote: On

Re: How to fix DatatypeContexts?

2013-07-18 Thread Edward Kmett
This is exactly what GADTs are for. -Edward On Thu, Jul 18, 2013 at 6:54 AM, harry volderm...@hotmail.com wrote: data Eq a = Pair a = Pair {x::a, y::a} equal :: Pair a - Bool equal pair = (x pair) == (y pair) This code will fail to compile, even with the deprecated DatatypeContexts

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-17 Thread Edward Kmett
This happened because I copied the surrounding style blindly. I fucked up. state f = get = \s - case f s of (a, s) - do put s return a would not have the problem and would have given a warning about name shadowing. I for one am somewhat neutral on the *adding* a non-recursive let

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-17 Thread Edward Kmett
FWIW, I maintain, according to wc and sloccount, 220841 lines worth of Haskell code at present. I have been bitten this error one time, so it affects me .45% of the time and that was only because it was in the only package I was not using -Wall on. -Edward On Wed, Jul 17, 2013 at 12:23 PM,

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-11 Thread Edward Kmett
On Wed, Jul 10, 2013 at 3:47 AM, o...@okmij.org wrote: Jon Fairbairn wrote: It just changes forgetting to use different variable names because of recursion (which is currently uniform throughout the language) to forgetting to use non recursive let instead of let. Let me bring to the

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-11 Thread Edward Kmett
, Carter Schonwald wrote: Yup. Nested cases *are* non recursive lets. (Can't believe I forgot about that ) On Thursday, July 11, 2013, Edward Kmett wrote: On Wed, Jul 10, 2013 at 3:47 AM, o...@okmij.org javascript:_e({}, 'cvml', 'o...@okmij.org'); wrote: Jon Fairbairn

Re: Field accessor type inference woes

2013-07-02 Thread Edward Kmett
On Tue, Jul 2, 2013 at 4:53 AM, AntC anthony_clay...@clear.net.nz wrote: I was envisaging that we might well need a functional dependency Hi Adam, Edward, (Simon), I think we should be really careful before introducing FunDeps (or type functions). Can we get to the needed type

Field accessor type inference woes

2013-07-01 Thread Edward Kmett
It strikes me that there is a fairly major issue with the record proposal as it stands. Right now the class class Has (r :: *) (x :: Symbol) (t :: *) can be viewed as morally equivalent to having several classes class Foo a b where foo :: a - b class Bar a b where bar

Re: Field accessor type inference woes

2013-07-01 Thread Edward Kmett
putting dummies in scope just to force conflict. -Edward Thanks, Adam On 01/07/13 15:48, Edward Kmett wrote: It strikes me that there is a fairly major issue with the record proposal as it stands. Right now the class class Has (r :: *) (x :: Symbol) (t :: *) can be viewed

Re: A possible alternative to dot notation for record access

2013-06-30 Thread Edward Kmett
(#) is a legal operator today and is used in a number of libraries. On Sun, Jun 30, 2013 at 11:38 PM, amin...@gmail.com wrote: As long as we're bikeshedding... Possibly '#' is unused syntax -- Erlang uses it for its records too, so we wouldn't be pulling it out of thin air. E.g.

Re: Overloaded record fields

2013-06-27 Thread Edward Kmett
On Thu, Jun 27, 2013 at 2:14 AM, AntC anthony_clay...@clear.net.nz wrote: Edward Kmett ekmett at gmail.com writes: Let me take a couple of minutes to summarize how the lens approach tackles the composition problem today without requiring confusing changes in the lexical structure

Re: Overloaded record fields

2013-06-26 Thread Edward Kmett
Note: the lens solution already gives you 'reverse function application' with the existing (.) due to CPS in the lens type. -Edward On Wed, Jun 26, 2013 at 4:39 PM, Simon Peyton-Jones simo...@microsoft.comwrote: | record projections. I would prefer to have dot notation for a | general,

Re: Overloaded record fields

2013-06-26 Thread Edward Kmett
Let me take a couple of minutes to summarize how the lens approach tackles the composition problem today without requiring confusing changes in the lexical structure of the language. I'll digress a few times to showcase how this actually lets us make more powerful tools than are available in

[Haskell-cafe] [haskell.org Google Summer of Code] The Summer of Code is officially under way.

2013-06-18 Thread Edward Kmett
The getting to know your mentor period has passed and the Summer of Code has officially begun. Keep in mind that mid-term evaluations will begin July 29th, so students will need to hit the ground running. I'm looking forward to seeing what we can accomplish together this year! -Edward

Re: [Haskell-cafe] [haskell.org Google Summer of Code 2013] Approved Projects

2013-06-02 Thread Edward Kmett
but there may be a free equivalent Dominic Steinitz domi...@steinitz.org http://idontgetoutmuch.wordpress.com On 28 May 2013, at 16:11, Edward Kmett ekm...@gmail.com wrote: Hi Dominic, The proposal is admittedly rather unfortunately opaque. The parts I can shed light on: Students come

  1   2   3   4   5   >