On Sat, Mar 8, 2008 at 9:23 PM, Brandon S. Allbery KF8NH
I think you might be able to do this as a typeclass instead, at the
expense of having to insert an instance declaration for each type.
(You will have to use an extension if you want to declare instances
for types such as Int. I
On Mar 8, 2008, at 10:54 PM, Don Stewart wrote:
[... replying to my poorly informed rant about exceptions ... ]
I don't understand this complaint -- you can handle all these with
Control.Exception.
xmonad catches all these things for example, in user code, to prevent
poorly written
donn:
On Mar 8, 2008, at 10:54 PM, Don Stewart wrote:
[... replying to my poorly informed rant about exceptions ... ]
I don't understand this complaint -- you can handle all these with
Control.Exception.
xmonad catches all these things for example, in user code, to prevent
poorly
Hi,
I'm just working through Hutton's Programming in Haskell and I found
an exercise which I can't solve, although it looks simple. Maybe someone
here could give me a hint?
Exercise:
Show how the single comprehension [(x,y) | x - [1,2,3], y - [4,5,6]]
with two generators can be re-expressed
Exercise:
Show how the single comprehension [(x,y) | x - [1,2,3], y -
[4,5,6]] with two generators can be re-expressed using two
comprehensions with single generators.
Hint: make use of the library function _concat_.
Another hint: it can be rewritten as
concatMap (\x - concatMap (\y -
On Sun, Mar 9, 2008 at 7:27 PM, Philip Müller [EMAIL PROTECTED]
wrote:
Hi,
I'm just working through Hutton's Programming in Haskell and I found
an exercise which I can't solve, although it looks simple. Maybe someone
here could give me a hint?
Exercise:
Show how the single comprehension
On Sat, 8 Mar 2008, Donn Cave wrote:
On Mar 8, 2008, at 12:33 PM, Henning Thielemann wrote:
On Sat, 8 Mar 2008, Denis Bueno wrote:
...
I am also using STUArray from some time-critical code; however, I
don't deal with ArrayException, or any exceptions for that matter.
What besides an
---
Haskell Weekly News
http://sequence.complete.org/hwn/20080309
Issue 71 - March 09, 2008
---
Welcome to issue 71 of HWN, a newsletter covering
2008/3/8 Galchin Vasili [EMAIL PROTECTED]:
I am playing around with the STM API. I would like to see examples of
STM other than the Santa.hs as I am having problems with STM vs IO.
The STM papers were the best documentation for me:
Ok, I did some search and found Data.Map, which can be used to implement
pretty fast sorting:
import qualified Data.Map as Map
treeSort :: Ord a = [a] - [a]
treeSort = map (\(x,_) - x ) . Map.toAscList . Map.fromList . map
(\x-(x,()))
In fact It is likely to behave like sort, with the exception
On Sunday 09 March 2008, Krzysztof Skrzętnicki wrote:
Ok, I did some search and found Data.Map, which can be used to implement
pretty fast sorting:
import qualified Data.Map as Map
treeSort :: Ord a = [a] - [a]
treeSort = map (\(x,_) - x ) . Map.toAscList . Map.fromList . map
(\x-(x,()))
dan.doel:
On Sunday 09 March 2008, Krzysztof Skrzętnicki wrote:
Ok, I did some search and found Data.Map, which can be used to implement
pretty fast sorting:
import qualified Data.Map as Map
treeSort :: Ord a = [a] - [a]
treeSort = map (\(x,_) - x ) . Map.toAscList . Map.fromList .
Hugo Pacheco:
If the equality does not hold, you should get a type error because
your program is not type correct. So, what is it that you would like
different?
I would simply like the compiler not to use that instance if the
equality constraint does not hold, like some another instance
On Sun, 2008-03-09 at 23:04 -0400, Dan Doel wrote:
On Sunday 09 March 2008, Krzysztof Skrzętnicki wrote:
What do you think about this particular function?
Some thoughts:
1) To get your function specifically, you could just use Data.Set.Set a
instead of Map a ().
2) What does it do
14 matches
Mail list logo