Re: Typing pattern synonyms

2015-09-30 Thread Bardur Arantsson
On 09/30/2015 08:10 PM, David Feuer wrote: > 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.

Typing pattern synonyms

2015-09-30 Thread Sven Panne
The type of a pattern synonym like pattern FOO = 1234 seems to be '(Eq a, Num a) => a', which makes partially makes sense, although it's not immediately clear to me where the 'Eq a' part comes from. But probably that would be clear if I read the desugaring rules closely enough. ;-) My real

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

[Haskell] Haskell Weekly News

2015-09-30 Thread Kim-Ee Yeoh
*Top picks:* - Neil Mitchell reports a stack overflow with 7.10.2 maximumBy that regresses from 7.8.3. His sixth sense points to the Foldable-Traversable coup (aka BBP: Burning

Re: Typing pattern synonyms

2015-09-30 Thread Sven Panne
2015-09-30 20:10 GMT+02:00 David Feuer : > The Eq constraint is needed to support pattern matching, the raison d’être > of pattern synonyms. > I was just a bit confused by the fact that normally you don't need an 'Eq a' constraint for pattern matching. But looking at the

[Haskell] Call for Scholarship Applications: Programming Languages Mentoring Workshop - a POPL workshop (Deadline: October 23!)

2015-09-30 Thread Dimitrios Vytiniotis
CALL FOR SCHOLARSHIP APPLICATIONS (Deadline: October 23!) ACM SIGPLAN Programming Languages Mentoring Workshop, St. Petersburg, Florida, USA Tuesday, January 19, 2016 Co-located with POPL 2016 PLMW web page: http://conf.researchr.org/home/PLMW-2016 After the resounding success of the first