Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: populating a bloom filter; stymied by ST monad (Joey Hess)
2. NCurses program cannot be interpreted? (Aditya Manthramurthy)
3. Re: populating a bloom filter; stymied by ST monad
(Chadda? Fouch?)
----------------------------------------------------------------------
Message: 1
Date: Mon, 12 Mar 2012 13:55:40 -0400
From: Joey Hess <[email protected]>
Subject: Re: [Haskell-beginners] populating a bloom filter; stymied by
ST monad
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
I mostly figured this out. stToIO allows converting (ST s a) to (IO a)
and so I can update the bloom filter in IO.
I do still wonder if there's a better way, avoiding modifying the filter
inside IO and keeping it in ST.
--
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120312/04e701bb/attachment-0001.pgp>
------------------------------
Message: 2
Date: Tue, 13 Mar 2012 13:54:10 +0530
From: Aditya Manthramurthy <[email protected]>
Subject: [Haskell-beginners] NCurses program cannot be interpreted?
To: [email protected]
Message-ID:
<CAC_mE95uM7omH5=drt13ycx6q3afudh4+c0h1pnofrr1wbx...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hi,
I am writing an ncurses based haskell program. I am unable to run it via
ghci - I get an error message saying that UI.NCurses could not be found. If
I run it via "runhaskell", the terminal gets messed up. The only way that I
found works is to compile it using "ghc source.hs" and running the binary.
I can guess that not being able to interpret it has something to do with
the terminal like capabilities of ghci (as ncurses needs a terminal I
suppose). But why does runhaskell not work either? I am just trying to
understand how the three ways to run the program are different.
Thanks,
Aditya
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120313/f88a699c/attachment-0001.htm>
------------------------------
Message: 3
Date: Tue, 13 Mar 2012 10:18:14 +0100
From: Chadda? Fouch? <[email protected]>
Subject: Re: [Haskell-beginners] populating a bloom filter; stymied by
ST monad
To: Joey Hess <[email protected]>
Cc: [email protected]
Message-ID:
<CANfjZRbyP25D993hXJJv4Gk6x5_oxbvKL3jVANvQkaAuERvo=g...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
getValues update initial = go initial =<< gen
where
go v [] = return v
go v (f:fs) = do
You say that this stream lazily, so I deduce that gen produce a lazy
IO list. So you should be able to use gen in conjunction with easyList
to get your bloom filter lazily. I'm not sure what the problem is ?
How exactly do you get the elements of your bloom filter from gen
input ?
--
Jeda?
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 45, Issue 17
*****************************************