On Wed, May 12, 2004 at 01:33:40AM +0100, Jorge Adriano Aires wrote:
This higher order function seems quite useful to me and not trivial, so I
expected it to be available. When this happens I wonder if I'm missing
something. Am I complicating things? Is it actually available (or some other
Hey all,
Does anyone know of a good way to visualise (graph) a type class
hierarchy, including one with multiple-parameter type classes? The
traditional inherits from arrows used in graphs of object-oriented
classes doesn't deal very well with type classes. A simple case, such
as:
Hi,
I have some problems with cyclic dependencies.
Module Foo:
data Foo = Foo { bar :: Bar }
Module Bar:
class BarClass b where
barfun :: b - Foo - Foo
data Bar = forall b . (BarClass b) = Bar b
Obviously I have to import both modules mutually. My workaround was to
So, yes, it is useful, but should it be included in a standard Monad
module? After all, this module contains mostly trivial functions ;)
BTW. You can write this function using foldM:
compM l a = foldM (#) a l
where # is an often used reverse application operator:
x # f = f x
Hello all,
I'm new to haskell and was just wondering if there was any efficient
or standard way to store and modify some sort of state data. The
functional nature of haskell has me confused in this respect! Basically
what I want to achieve is an interactive program that allows you to edit
simplest way... use a recursive function that feeds itself the
state as one of its arguments...
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
At 4:09 PM + 5/12/04, scott west wrote:
Hello all,
I'm new to haskell and was just wondering if there was any
efficient or standard way to store and modify some sort of state
data. The functional nature of haskell has me confused in this
respect! Basically what I want to achieve is an
MR K P SCHUPKE wrote:
simplest way... use a recursive function that feeds itself the
state as one of its arguments...
Mmm, yes I had thought of that. But I wasn't sure how it would work, as
you can't have variables in the same sense as imperative languages. So
if I create a mainloop sort of
I clearly don't understand Haskell very deeply yet because I dealt with a
couple of interesting types of bug this week.
One sort was where, if I have,
f :: SomeType - Stuff ...
f = whatever
g :: Stuff ...
g = f someValue
...then I can get an error that suggests that maybe I'm violating the