Re: [Haskell-cafe] Can I have an alias for selector?

2011-11-17 Thread Ivan Lazar Miljenovic
On 18 November 2011 18:16, Magicloud Magiclouds wrote: > Hi, >  For example: "data A = B { c :: Int }". Then I must use it this way > "(B 0) { c = 1 }". Anyway I could make it like "(B 0) { d = 1 }"? No, but you *can* write a function of type `B -> Int -> B' to do it for you. -- Ivan Lazar Milj

Re: [Haskell-cafe] A Mascot

2011-11-17 Thread heathmatlock
Last time to upload images for a long time, the break is here and I have work to do! I got a bit tired of explaining that it's a lamb, and not something similar to a rat, so I made the face less abstract. My little niece liked it better than the old one for some reason. Here's some images I threw t

[Haskell-cafe] Can I have an alias for selector?

2011-11-17 Thread Magicloud Magiclouds
Hi, For example: "data A = B { c :: Int }". Then I must use it this way "(B 0) { c = 1 }". Anyway I could make it like "(B 0) { d = 1 }"? -- 竹密岂妨流水过 山高哪阻野云飞 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/

Re: [Haskell-cafe] Documenting strictness properties for Data.Map.Strict

2011-11-17 Thread Evan Laforge
> Any ideas for further improvements? I feel like there should be a canonical "what is WHNF" page on haskell.org that docs like this can link to. Namely, what it is theoretically, what that means for various examples of thunks (i.e. show how a sample graph would get reduced), and what that means

Re: [Haskell-cafe] Documenting strictness properties for Data.Map.Strict

2011-11-17 Thread Ivan Lazar Miljenovic
On 18 November 2011 16:44, Johan Tibell wrote: > On Thu, Nov 17, 2011 at 9:21 PM, Johan Tibell wrote: >> I'm not entirely happy with this formulation. I'm looking for >> something that's clear (i.e. precise and concise, without leaving out >> important information), assuming that the reader alrea

Re: [Haskell-cafe] Documenting strictness properties for Data.Map.Strict

2011-11-17 Thread Johan Tibell
On Thu, Nov 17, 2011 at 9:21 PM, Johan Tibell wrote: > I'm not entirely happy with this formulation. I'm looking for > something that's clear (i.e. precise and concise, without leaving out > important information), assuming that the reader already knows how > lazy evaluation works at a high level.

Re: [Haskell-cafe] Superset of Haddock and Markdown

2011-11-17 Thread Ivan Lazar Miljenovic
On 18 November 2011 16:09, Johan Tibell wrote: > Hi all, > I spent some time today documenting a library and the experience left me > wanting a better markup language. In particular, Haddock lacks: >  * markup for bold text: bold text works better than italics for emphasis on > computer monitors.

[Haskell-cafe] Documenting strictness properties for Data.Map.Strict

2011-11-17 Thread Johan Tibell
Hi all, Data.Map is getting split into Data.Map.Lazy and Data.Map.Strict (with Data.Map re-exporting the lazy API). I want to better document the strictness properties of the two new modules. Right now the documentation for Data.Map.Strict reads: Strictness properties = * Al

Re: [Haskell-cafe] ST not strict enough?

2011-11-17 Thread Jason Dusek
2011/11/16 Tristan Ravitch : > Have you tried building the vector using things besides > write/ST? It might be a bit faster to use something like > Vector.unfoldr or Vector.generateM and ByteString.index to > build up a pure Vector. After that you could use > Vector.unsafeThaw to convert that pure

[Haskell-cafe] Superset of Haddock and Markdown

2011-11-17 Thread Johan Tibell
Hi all, I spent some time today documenting a library and the experience left me wanting a better markup language. In particular, Haddock lacks: * markup for bold text: bold text works better than italics for emphasis on computer monitors. * hyperlinks with anchor texts: having the actual URL r

Re: [Haskell-cafe] ST not strict enough?

2011-11-17 Thread Jason Dusek
2011/11/16 Johan Tibell : > On Wed, Nov 16, 2011 at 2:23 PM, Jason Dusek wrote: >> Tried a modifySTRef' defined this way: >> >> modifySTRef' ref f           =  do >>  val                       <-  (f $!!) <$> readSTRef ref >>  writeSTRef ref (val `seq` val) >> >> ...but there was no change in memo

Re: [Haskell-cafe] A Mascot

2011-11-17 Thread heathmatlock
On Thu, Nov 17, 2011 at 12:22 PM, Andrew Coppin wrote: > On 16/11/2011 04:50 AM, heathmatlock wrote: > > If you're going to draw a piece of graphics, why use ASCII workarounds > like "_|_", when you can use the real thing (i.e., "⊥")? > > Noted, will change. Are we going to have a contest for a

Re: [Haskell-cafe] A Mascot

2011-11-17 Thread Andrew Coppin
On 16/11/2011 04:50 AM, heathmatlock wrote: On Tue, Nov 15, 2011 at 10:18 PM, John Meacham mailto:j...@repetae.net>> wrote: People tend to concentrate on the lambda which cooresponds to the functional aspect of haskell when designing logos. Not nearly enough attention is paid to th

Re: [Haskell-cafe] Is SmallCheck maintained?

2011-11-17 Thread Jason Dagit
On Mon, Nov 14, 2011 at 9:54 AM, Roman Cheplyaka wrote: > Hi Cafe, > > Does anyone currently work on Test.SmallCheck? I recall this being an unfortunate problem from the first release. As I recall the author was interested in getting the concept out there but had no motivation (or was it interes

Re: [Haskell-cafe] A Mascot

2011-11-17 Thread Brent Yorgey
On Thu, Nov 17, 2011 at 10:28:47AM +0100, Alexander Bernauer wrote: > On Tue, Nov 15, 2011 at 08:18:04PM -0800, John Meacham wrote: > > People tend to concentrate on the lambda which cooresponds to the > > functional aspect of haskell when designing logos. Not nearly enough > > attention is paid to

Re: [Haskell-cafe] Deduce problem.

2011-11-17 Thread Magicloud Magiclouds
From the code, I think it is what I want. But still, I need some time to understand it Anyway, thank you. On Thu, Nov 17, 2011 at 4:02 PM, wrote: > > Multi-parameter type classes are more flexible. Here is how you can > write your old code: > >> {-# LANGUAGE MultiParamTypeClasses, FlexibleIn

Re: [Haskell-cafe] A Mascot

2011-11-17 Thread Alexander Bernauer
On Tue, Nov 15, 2011 at 08:18:04PM -0800, John Meacham wrote: > People tend to concentrate on the lambda which cooresponds to the > functional aspect of haskell when designing logos. Not nearly enough > attention is paid to the other striking feature, the laziness. If we want to emphasize the lazy

Re: [Haskell-cafe] Deduce problem.

2011-11-17 Thread oleg
Multi-parameter type classes are more flexible. Here is how you can write your old code: > {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} > > class (ClassA a, ClassB b) => ClassC a b where > from :: a -> [b] > to :: a -> [b] > > data H = H > > class ClassA a where toInt :: a -> I