thanks!
suppose we have
data Tree a = Leaf a | Branch (Tree a) (Tree a) deriving Show
and how I could define a function foo :: a - Tree a that
foo a = Leaf a where a is not a type of Tree
foo b = b where b is one of the type of Tree (Leaf or Branch) ?
The following
On Thu, Jan 1, 2009 at 12:36 AM, Max.cs max.cs.2...@googlemail.com wrote:
thanks!
suppose we have
data Tree a = Leaf a | Branch (Tree a) (Tree a) deriving Show
and how I could define a function foo :: a - Tree a that
foo a = Leaf a where a is not a type of Tree
foo b = b
Hello Max.cs,
Thursday, January 1, 2009, 11:36:24 AM, you wrote:
seems that you come from dynamic languages :)
Haskell has static typing meaning that your function can accept either
Tree or a as arguments. so you should convert a to Tree explicitly,
using Leaf
thanks!
S. Günther wrote:
Untying the knot was (and still is) exactly the problem I was facing.
I knew that the whole list had to be rebuild and wasn't concerned
with performance since at that point I just wanted to know how to
do it and if it is possible at all. After I realized that it maybe just to
On 1 Jan 2009, at 09:36, Max.cs wrote:
thanks!
suppose we have
data Tree a = Leaf a | Branch (Tree a) (Tree a) deriving Show
and how I could define a function foo :: a - Tree a that
foo a = Leaf a where a is not a type of Tree
foo b = b where b is one of the type
2008/12/31 Paolino paolo.verone...@gmail.com:
I must ask why runWriterT k :: State s (a,[Int]) is working.
Looks like I could runIO the same way I evalState there.
In that case I wouldn't wait for the State s action to finish.
Thanks
Assuming you have Control.Monad.State.Lazy (which I think
Happy new year, you all!
I'm pleased to announce three new packages on Hackage:
* salvia-0.0.4: A lightweight modular web server framework.
* orchid-0.0.6: A(nother) Wiki written in Haskell, currently using
Darcs as a versioning back-end and Salvia as the application server.
Orchid
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On Thu, Jan 1, 2009 at 9:04 AM, Sebastiaan Visser wrote:
Happy new year, you all!
I'm pleased to announce three new packages on Hackage:
* salvia-0.0.4: A lightweight modular web server framework.
* orchid-0.0.6: A(nother) Wiki written in
Cetin Sert wrote:
Hi,
A package I want to upload only builds with the unreleased gtk2hs
version from the darcs repository and not the latest released version
0.9.13 or any lesser. But the repository version seems to not have
changed, so if I say in my cabal file:
gtk = 0.9.14
it does not
On Jan 1, 2009, at 7:15 PM, Gwern Branwen wrote:
On Thu, Jan 1, 2009 at 9:04 AM, Sebastiaan Visser wrote:
Happy new year, you all!
I'm pleased to announce three new packages on Hackage:
...
Miscellaneous comments:
1) You're right about cabal-install versus runhaskell etc. There seems
to be
On Thu, 2009-01-01 at 02:17 -0800, Ryan Ingram wrote:
2008/12/31 Paolino paolo.verone...@gmail.com:
I must ask why runWriterT k :: State s (a,[Int]) is working.
Looks like I could runIO the same way I evalState there.
In that case I wouldn't wait for the State s action to finish.
Thanks
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On Thu, Jan 1, 2009 at 1:39 PM, Sebastiaan Visser wrote:
On Jan 1, 2009, at 7:15 PM, Gwern Branwen wrote:
On Thu, Jan 1, 2009 at 9:04 AM, Sebastiaan Visser wrote:
Happy new year, you all!
I'm pleased to announce three new packages on
On Thu, Jan 1, 2009 at 5:17 AM, Ryan Ingram ryani.s...@gmail.com wrote:
It might be possible to build a lazy-ify monad transformer which
would make this work. In particular, I think Oleg's LogicT
transformer[1] does something of the sort, only applying side effects
where they are required in
First off, let me apologize for this ongoing series of stupid newbie
questions. Haskell just recently went from that theoretically interesting
language I really need to learn some day to a language I actually kinda
understand and can write real code in (thanks to Real World Haskell). Of
Hello Brian,
Brian Hurt wrote:
[...]
So today's question is: why isn't there a Strict monad? Something like:
data Strict a = X a
instance Monad Strict where
( = ) (X m) f = let x = f m in x `seq` (X x)
return a = a `seq` (X a)
unless I am mistaken, this violates the first
On Thu, Jan 1, 2009 at 12:25 PM, Brian Hurt bh...@spnz.org wrote:
First off, let me apologize for this ongoing series of stupid newbie
questions. Haskell just recently went from that theoretically interesting
language I really need to learn some day to a language I actually kinda
understand
On Thu, 2009-01-01 at 14:25 -0500, Brian Hurt wrote:
First off, let me apologize for this ongoing series of stupid newbie
questions. Haskell just recently went from that theoretically interesting
language I really need to learn some day to a language I actually kinda
understand and can
2009/1/1 Luke Palmer lrpal...@gmail.com:
So that's the answer: there already is a Strict monad. And an attempt to
make a lazier one strict just results in breaking the monad laws.
There is at least one transformer that will make a strict monad out of
a non-strict monad.
newtype CPS m a = CPS
On Thu, Jan 1, 2009 at 1:31 PM, David Menendez d...@zednenem.com wrote:
2009/1/1 Luke Palmer lrpal...@gmail.com:
So that's the answer: there already is a Strict monad. And an attempt to
make a lazier one strict just results in breaking the monad laws.
There is at least one transformer
On Thu, Jan 1, 2009 at 10:39 AM, Sebastiaan Visser sfvis...@cs.uu.nl wrote:
On Jan 1, 2009, at 7:15 PM, Gwern Branwen wrote:
On Thu, Jan 1, 2009 at 9:04 AM, Sebastiaan Visser wrote:
Happy new year, you all!
I'm pleased to announce three new packages on Hackage:
...
Miscellaneous
On Thu, Jan 1, 2009 at 3:44 PM, Luke Palmer lrpal...@gmail.com wrote:
On Thu, Jan 1, 2009 at 1:31 PM, David Menendez d...@zednenem.com wrote:
newtype CPS m a = CPS { unCPS :: forall b. (a - m b) - m b }
I have heard this called the codensity monad (and it appears under that
name in
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
In the spirit of my previous email on haikus (which turned out fairly
well), I'd like to issue a RFK (Request For Koans) to everyone!
You can find what I've accumulated already on
http://haskell.org/haskellwiki/Koans . There are a few there, but
On Thu, 2009-01-01 at 13:44 -0700, Luke Palmer wrote:
On Thu, Jan 1, 2009 at 1:31 PM, David Menendez d...@zednenem.com
wrote:
2009/1/1 Luke Palmer lrpal...@gmail.com:
So that's the answer: there already is a Strict monad. And
an attempt to
make a
I think I have a very similar problem to the currently discussed
WriterT [w] IO is not lazy in reading [w].
I want to defer IO actions, until they are needed, but they shall be
executed in order. If I call unsafeInterleaveIO, they can be executed in
any order. I understand that hGetContents does
Very nice! I'd love to see more of these. :-)
On Thu, Jan 1, 2009 at 2:27 PM, Gwern Branwen gwe...@gmail.com wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
In the spirit of my previous email on haikus (which turned out fairly
well), I'd like to issue a RFK (Request For Koans) to
On Thu, Jan 1, 2009 at 2:30 PM, Jonathan Cast jonathancc...@fastmail.fmwrote:
On Thu, 2009-01-01 at 13:44 -0700, Luke Palmer wrote:
On Thu, Jan 1, 2009 at 1:31 PM, David Menendez d...@zednenem.com
wrote:
2009/1/1 Luke Palmer lrpal...@gmail.com:
So that's the
On Thu, Jan 1, 2009 at 4:30 PM, Jonathan Cast jonathancc...@fastmail.fm wrote:
On Thu, 2009-01-01 at 13:44 -0700, Luke Palmer wrote:
In my reply I missed the important consideration of the strictness of
(=), irrsepective of the values. While you can not force values to
be strict in a monad
On Thu, 2009-01-01 at 17:03 -0500, David Menendez wrote:
On Thu, Jan 1, 2009 at 4:30 PM, Jonathan Cast jonathancc...@fastmail.fm
wrote:
On Thu, 2009-01-01 at 13:44 -0700, Luke Palmer wrote:
In my reply I missed the important consideration of the strictness of
(=), irrsepective of the
Judah Jacobson schrieb:
On Thu, Jan 1, 2009 at 10:39 AM, Sebastiaan Visser sfvis...@cs.uu.nl wrote:
On Jan 1, 2009, at 7:15 PM, Gwern Branwen wrote:
On Thu, Jan 1, 2009 at 9:04 AM, Sebastiaan Visser wrote:
Happy new year, you all!
I'm pleased to announce three new packages on Hackage:
...
Sebastiaan Visser schrieb:
Happy new year, you all!
I'm pleased to announce three new packages on Hackage:
* salvia-0.0.4: A lightweight modular web server framework.
Is it based on Simon Marlow's HWS, like mohws on Hackage? Does it
support HTTPS?
http://books.google.com/books?id=tiMPCAAJhl=de
(by Gerald M. Weinberg)
I suggest you procure a copy and read it for
a) the lulz (a lot of them)
b) insight into your own hack mode
c) insight into how to hack recruiting and team lead
d) ways to make Haskell even more subversive
--
(c) this
Whether circular or not, sharing values by using a back pointer is
problematic for any update. Why not use a zipper instead?
I looked into zippers before and the problem I had was that they never
really matched the structure which I needed and which led me to think
about this whole knot tying
On 2009 Jan 1, at 16:44, Henning Thielemann wrote:
If it is generally possible to use unsafeInterleaveIO such that it
executes actions in the right order, wouldn't this allow the
definition
of a general lazy IO monad?
I thought unsafeInterleaveIO and users of it (readFile, hGetContents)
On Fri, 2009-01-02 at 10:48 +1100, S. Günther wrote:
Whether circular or not, sharing values by using a back pointer is
problematic for any update. Why not use a zipper instead?
I looked into zippers before and the problem I had was that they never
really matched the structure which I needed
Haskell has been around in one form or another for nearly two decades
now, yet has never been extended with explicit support for object-
oriented programming. I've been thinking about why this is so. I've
come to the conclusion that Haskell simply doesn't need any explicit
OOP support --
Henning Thielemann schlepp...@henning-thielemann.de wrote:
If it is generally possible to use unsafeInterleaveIO such that it
executes actions in the right order, wouldn't this allow the
definition of a general lazy IO monad?
The question is what right order means.
Let B1..Bn be some
On Fri, 2 Jan 2009, Achim Schneider wrote:
Henning Thielemann schlepp...@henning-thielemann.de wrote:
If it is generally possible to use unsafeInterleaveIO such that it
executes actions in the right order, wouldn't this allow the
definition of a general lazy IO monad?
The question is what
On Thu, Jan 1, 2009 at 7:39 PM, Achim Schneider bars...@web.de wrote:
There are no lazy monads. Monads imply explicit sequencing...
Huh? How are you defining lazy monad?
--
Dave Menendez d...@zednenem.com
http://www.eyrie.org/~zednenem/
___
On Fri, 2 Jan 2009, Achim Schneider wrote:
There are no lazy monads. Monads imply explicit sequencing... writing
I think this is an extremely bad thing to say and is a source of
misunderstanding about monads and evaluation. Most monads _are_ lazy, and
it is important to understand that
Henning Thielemann lemm...@henning-thielemann.de wrote:
On Fri, 2 Jan 2009, Achim Schneider wrote:
Henning Thielemann schlepp...@henning-thielemann.de wrote:
If it is generally possible to use unsafeInterleaveIO such that it
executes actions in the right order, wouldn't this allow
On 2009 Jan 1, at 19:28, Kevin Van Horn wrote:
Haskell has been around in one form or another for nearly two
decades now, yet has never been extended with explicit support for
object-oriented programming. I've
http://homepages.cwi.nl/~ralf/OOHaskell/
On 2009 Jan 1, at 20:08, David Menendez wrote:
On Thu, Jan 1, 2009 at 7:39 PM, Achim Schneider bars...@web.de
wrote:
There are no lazy monads. Monads imply explicit sequencing...
Huh? How are you defining lazy monad?
We've had this discussion before; somewhere in the archives is an
Achim Schneider bars...@web.de wrote:
[...]
actually, even better:
main = do
acts - unsafeInterleaveIO getActs
putStrLn dumdidum
sequence_ acts
, which, at least on my machine, prints dumdidum before asking for foo.
--
(c) this sig last receiving data processing entity. Inspect
Brandon S. Allbery KF8NH allb...@ece.cmu.edu wrote:
On 2009 Jan 1, at 20:08, David Menendez wrote:
On Thu, Jan 1, 2009 at 7:39 PM, Achim Schneider bars...@web.de
wrote:
There are no lazy monads. Monads imply explicit sequencing...
Huh? How are you defining lazy monad?
We've had
On Thu, 2009-01-01 at 17:28 -0700, Kevin Van Horn wrote:
Haskell has been around in one form or another for nearly two decades
now, yet has never been extended with explicit support for
object-oriented programming.
Yes it has albeit in spun-off languages. See O'Haskell and Timber.
I've
On Thu, Jan 1, 2009 at 8:29 PM, Brandon S. Allbery KF8NH
allb...@ece.cmu.edu wrote:
On 2009 Jan 1, at 20:08, David Menendez wrote:
On Thu, Jan 1, 2009 at 7:39 PM, Achim Schneider bars...@web.de wrote:
There are no lazy monads. Monads imply explicit sequencing...
Huh? How are you defining
David Menendez d...@zednenem.com wrote:
On Thu, Jan 1, 2009 at 8:29 PM, Brandon S. Allbery KF8NH
allb...@ece.cmu.edu wrote:
On 2009 Jan 1, at 20:08, David Menendez wrote:
On Thu, Jan 1, 2009 at 7:39 PM, Achim Schneider bars...@web.de
wrote:
There are no lazy monads. Monads imply
Hello,
Say I have several data structures that are marshalled(using Binary
class) and written out linearly on persistence store. I want to calculate
the offsets in bytes of these various data structures in a functional
language way. What is the suggested (elegant) way ?
Regards, Vasili
On Wed, Dec 31, 2008 at 11:42 AM, Levi Greenspan
greenspan.l...@googlemail.com wrote:
Hence my question - is it likely that GHC will support epoll in 2009?
Yes. I'm working on a patch at the moment.
___
Haskell-Cafe mailing list
2009/1/1 Galchin, Vasili vigalc...@gmail.com:
Say I have several data structures that are marshalled(using Binary
class) and written out linearly on persistence store. I want to calculate
the offsets in bytes of these various data structures in a functional
language way. What is the
The second data structure is an array of structure .. the third set of
structure are a series of bit lists ... Each array element has an offset
for its corresponding bit list:
[{, offset: Int64}] [[bit]]
when I marshall up all this offset should be the serialized/marshalled
offset of
On Jan 1, 2009 11:50pm, Galchin, Vasili vigalc...@gmail.com wrote:
it is a bioinformatics standard .. . I am writing on this newsgroup in order
to try to be objective to get a correct and elegant answer .. in any case I
am helping on the bioinformatics code (you can see on Hackage). I am
Kevin == Kevin Van Horn ke...@ksvanhorn.com writes:
Kevin What do the rest of you think? Is my analysis correct?
No, because ...
Kevin Properly used, OOP is all about interface inheritance, not
Kevin implementation inheritance. (At least in C++,
Kevin implementation
dude .. you rock ... let me check it out ;^)
Vasili
On Fri, Jan 2, 2009 at 12:24 AM, Antoine Latter aslat...@gmail.com wrote:
On Jan 1, 2009 11:50pm, Galchin, Vasili vigalc...@gmail.com wrote:
it is a bioinformatics standard .. . I am writing on this newsgroup in
order to try to be
54 matches
Mail list logo