* John Meacham [2011-10-10 19:56:59-0700]
> What are you trying to acomplish? A case doesn't necessarily force
> evaluation in haskell depending on the binding pattern. for instance
>
> case x of _ -> undefined will parse, but the function is still lazy in
> x. it is exactly equivalant to
>
> qu
What are you trying to acomplish? A case doesn't necessarily force
evaluation in haskell depending on the binding pattern. for instance
case x of _ -> undefined will parse, but the function is still lazy in
x. it is exactly equivalant to
quodlibet x = undefined
If you want to actually enforce th
On 2011-10-09 07:26, Roman Beslik wrote:
> Why the following code does not work?
>> data Empty
>> quodlibet :: Empty -> a
>> quodlibet x = case x of
> "parse error (possibly incorrect indentation)"
It's a potential extension to ghc.
See http://hackage.haskell.org/trac/ghc/ticket/2431
A quick thought that came to me after hoogling [a] -> [[a]].
The first four functions in the search result are named after what they return
(noun in plural) rather than what they do (verb). I am talking about inits,
permutations, subsequence and tails.
So I thought the following syntax might wo
For instance, at your day job, the Array type.
On Wed, Oct 5, 2011 at 12:23 PM, Roman Leshchinskiy wrote:
> Simon Peyton-Jones wrote:
> >
> > I'm not sure if this plan would support [("fred",45), ("bill",22)] :: Map
> > String Int. Probably not. Maybe that's a shortcoming... but such Maps
> >
I thought it could be a nice GHC feature to optimize string lookup, and that
using case arrows could be a nice syntax for creating maps.
We will be fine using a Map. Making sure that sum types are optimized was
the important thing, thanks!
On Mon, Oct 10, 2011 at 1:14 AM, Simon Peyton-Jones
wrote
Hi,
Am Dienstag, den 04.10.2011, 09:39 +0300 schrieb Roman Cheplyaka:
> Suppose I want a foldl which is evaluated many times on the same
> list but with different folding functions.
I used this pattern successfully in SAT-Britney, where I generate a huge
list quite quickly, and I don’t want this
On 10/10/2011 09:04, Simon Peyton-Jones wrote:
Thank you for the detailed investigation. I have not followed all the
details of this thread, but I *think* that it may (happily) represent a
bug in generating TypeReps that is already fixed.
·We used to have a global cache from which we generated u
Greg
In GHC, big cases are done as tables (if dense) or trees (if sparse). If you
have some examples where things go bad, do submit a bug report.
For big dispatches on strings, I'm pretty sure we do something linear, top to
bottom. I'd be strongly inclined to use a proper Map structure if yo
Thank you for the detailed investigation. I have not followed all the details
of this thread, but I think that it may (happily) represent a bug in generating
TypeReps that is already fixed.
· We used to have a global cache from which we generated unique Int
keys corresponding to type
10 matches
Mail list logo