line 39 works fine
line 56 doesn't. Why?
Isn't both a IO monad (because of the print statements)
After commenting out 56 it compiles fine
Any suggestion appreciated.. I'm struggling for some hours now..
module Modules.ObjectTree where
import Debug.Trace
import Data.FunctorM
import DBUtils
Reilly Hayes [EMAIL PROTECTED] writes:
On Aug 7, 2006, at 10:00 AM, Stefan Monnier wrote:
In any case, making a living by selling a program (as opposed to services
around that program) is a difficult business.
Making a living writing and selling programs for use by a wide audience
Hello Ki,
Tuesday, August 8, 2006, 6:34:51 AM, you wrote:
Unfortunately seq and the strict data declaration is not helpful in general.
They are only helpful on base values such as Int or Bool.
What they do is just making sure that it is not a thunk.
That is if it was a list it would just
Ahn, Ki Yung wrote:
Recently, I'm facing the dark side of laziness
-- the memory leak because of laziness.
Typical pattern that I encounter the problem is like this.
My code was working fine and I was happy.
I just wanted to inspect some properties of my code so
I made a slight chage go the
Hi
I've tried as an exercise to learn how to use the state monad to create
a tree this way:
module Main where
import Control.Monad.State
import Data.Tree
import Random
createTree :: Int - Int - (Tree Int, Int)
createTree 4 = runState $ State $ \s - (Node s [] , s+1) -- stop at level 4
Is there a better way to do this?
This problem is similar to adding numbers to each tree item
Marc
Yes. The feature you wanted is replicateM.
The point of a State monad is you probably never have to touch the State data
constructor:
module Main where
import Control.Monad.State
import
Ahn, Ki Yung wrote:
Recently, I'm facing the dark side of laziness
-- the memory leak because of laziness.
Are there standardized approaches for detecting and fixing
these kind of problems?
Not really. As Don S. already said, try heap profiling. The function
that is too lazy will show up
Marc Weber wrote:
I've tried as an exercise to learn how to use the state monad to create
a tree this way:
createTree :: Int - Int - (Tree Int, Int)
createTree 4 = runState $ State $ \s - (Node s [] , s+1) -- stop at level 4
createTree level = runState (do item - State $ (\s - (s,s+1))
| I have initialized a wiki page:
|
| http://haskell.org/haskellwiki/Thread_local_storage
Great
| I have put a page on the wiki summarizing the thread. However, I want
| to say that I think that email is a better medium for most ongoing
| discussions.
I agree.
Discussion by email
Furthermore, can we move this thread from the Haskell mailing list
(which should not have heavy traffic) to either Haskell-Café, or
the libraries list?
Sure, moving to haskell-cafe.
Frederik
--
http://ofb.net/~frederik/
___
Haskell-Cafe mailing
On Tue, Aug 08, 2006 at 02:30:39PM +0200, Marc Weber wrote:
Is there a better way to do this?
In this case it is quite easy to separate the task into two smaller
ones:
- creating the tree with a desired shape
- numbering the nodes in post-order
The first task is naturally expressed without
Thanks to you all!
I think I've learned a lot.
Marc
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
The HWS - With Plugins tarball is unavailable at the author's website
(http://www.mdstud.chalmers.se/~md9ms/hws-wp/) and his email address
doesn't work so this is desperate attempt to reach him. So, Martin
Sjögren, are you here somewhere?
P.S. If someone else knows where I could get hold of the
Brian Hulley [EMAIL PROTECTED] writes:
Also, the bottom line imho is that Haskell is a difficult language to
understand, and this is compounded by the apparent cleverness of
unreadable code like:
c = (.) . (.)
when a normal person would just write:
c f g a b = f (g a b)
All
Hello,
as a haskell newbie I'm wondering about the following question.
Are there options to popular haskell implementations or other means
(haskell lint?) to check for incomplete patterns at compile time for
some? I can't see a reason why this shouldn't be possible or even a
relatively
The ghc flag -fwarn-incomplete-patterns might be what you're looking for.
/g
On 8/8/06, Jens Theisen [EMAIL PROTECTED] wrote:
Hello,
as a haskell newbie I'm wondering about the following question.
Are there options to popular haskell implementations or other means
(haskell lint?) to check
jens-theisen-tmp01:
Hello,
as a haskell newbie I'm wondering about the following question.
Are there options to popular haskell implementations or other means
(haskell lint?) to check for incomplete patterns at compile time for
some? I can't see a reason why this shouldn't be possible
On Aug 8, 2006, at 1:42 AM, Immanuel Litzroth wrote:"Reilly Hayes" [EMAIL PROTECTED] writes: I don't understand your argument. How exactly does the GPL get in theway of selling software as an instantiation of business expertise?Are you saying that you have the business expertise but
18 matches
Mail list logo