Thanks Udo, that helped a lot.
I added the link to haskell.org. I couldn't find a proper place to
put it, so I added a page 'By topic' (still quite empty) linked from
the main page. (I hope that wasn't against any rules I missed; if
anybody objects please feel free to remove it.)
cheers,
Tomasz Zielonka wrote:
On Thu, Feb 16, 2006 at 04:36:06PM +0100, Christian Maeder wrote:
Udo Stenzel wrote:
(*) :: Monad m = m a - m b - m a
m * n = do a - m ; n ; return a
Right, that one is really useful. I named it (), though, conforming to
(=) versus (=).
But = first executes the
HaXml seems to choke on finding an ampersand in an attribute value. Is
this normal? Is there any workaround?
Cheers,
Koen.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Thu, Feb 16, 2006 at 09:50:51AM -0300, Thiago Arrais wrote:
On 2/16/06, Thiago Arrais [EMAIL PROTECTED] wrote:
Just take a look at the latest integration build that you are able to find
at
http://eclipsefp.sourceforge.net/download
There is also a screenshot at
Marc Weber [EMAIL PROTECTED] writes:
I tried downloading, eclipse and the latest EcplipseFP zip file.
I couldn't use the standard installer (Help- Add Features ..) because
it didn't find anything..
Strange, that worked for me.
From my quick look, Eclipse looks like a workable candidate.
[EMAIL PROTECTED] wrote:
HaXml seems to choke on finding an ampersand in an attribute value. Is
this normal? Is there any workaround?
Yes, it is expected. An ampersand indicates the start of a reference,
e.g. lt; or #20; If there is no semicolon to indicate the end of the
reference, then
Martin Sulzmann [EMAIL PROTECTED] wrote::
Stefan Wehr writes:
[...]
Manuel (Chakravarty) and I agree that it should be possible to
constrain associated type synonyms in the context of class
definitions. Your example shows that this feature is actually
needed. I will integrate it into
Hello,
For the purpose of familiarizing myself with Haskell, and also because I
love Haskell :),
I am trying to re-make a script that I made in Python that sends a
request to a server and extracts the list of email addresses from a
Mailman web-page by using an XML Parser on the page's HTML that
please can you help me with this function:
Significant Figures
I need to write a function to return a given number (1st argument) to a
given number of significant figures
(2nd argument). The function should be called sigFig and have a type
signature of the form:
sigFig :: (???) = a - Int - a
You can access IO values only from within do blocks (see any tutorial,
previous posts or google).
It looks like this then:
do=
myvalue - functionwhichreturnsIOValue
dosomethingwith myvalue
Due to monads you don't have to leave the IO monad this way.
Oh. Have to go now.
do is translated into
But speaking of HaXml bugs, I'm pretty sure HaXml doesn't handle
% correctly. It seem to treat % specially everywhere, but I think
it is only special inside DTDs. I have many XML files produced by
other tools that the HaXml parser fails to process because of this.
-- Lennart
Malcolm
Peter [EMAIL PROTECTED] writes:
So, How am I supposed to get the value of an IO Monad, such as IO
String, without returning an IO Monad?
Short answer: you don't. IO is a one way street.
Build your application top down in the IO monad (starting with
'main'), and bottom up with pure code,
IBRAHIM MOSHAYA [EMAIL PROTECTED] writes:
I need to write a function to return a given number
Homework assignment?
Perhaps if you get stuck, you can post your best current effort, and
people will be able to nudge you in the right direction?
-k
--
If I haven't seen further, it is by standing
On 2/17/06, Peter [EMAIL PROTECTED] wrote:
Hello,
For the purpose of familiarizing myself with Haskell, and also because I
love Haskell :),
I am trying to re-make a script that I made in Python that sends a
request to a server and extracts the list of email addresses from a
Mailman web-page
On 2/16/06, Jared Updike [EMAIL PROTECTED] wrote:
If you need an easier way to search the Haskell APIs, use Hoogle:
Hoogle is very nice. Thanks to everyone who answered my question about
finding a sort library function.
--
regards,
radu
http://rgrig.blogspot.com/
Hi,
Am Freitag, 17. Februar 2006 14:42 schrieb Peter:
Hello,
For the purpose of familiarizing myself with Haskell, and also because I
love Haskell :),
very good!
I am trying to re-make a script that I made in Python that sends a
request to a server and extracts the list of email addresses
Something more controversial.
Why ATS at all? Why not encode them via FDs?
Funny you should say that, just when I've been thinking about
the same thing. That doesn't mean that ATS aren't a nice way
to describe some special cases of FDs, but my feeling is that
if ATS can't be encoded in FDs,
On Fri, Feb 17, 2006 at 01:26:18PM +, Stefan Wehr wrote:
Martin Sulzmann [EMAIL PROTECTED] wrote::
By possible you mean this extension won't break any
of the existing ATS inference results?
Yes, although we didn't go through all the proofs.
You have to be very careful otherwise
But speaking of HaXml bugs, I'm pretty sure HaXml doesn't handle
% correctly. It seem to treat % specially everywhere, but I think
it is only special inside DTDs. I have many XML files produced by
other tools that the HaXml parser fails to process because of this.
I had a similar problem
Peter wrote:
So, How am I supposed to get the value of an IO Monad, such as IO
String, without returning an IO Monad?
You read correctly, this is impossible. You already got some valid
answers, and here's another variant that preserves most of the nice
guarded expressions:
recv_headers' ::
Lennart Augustsson wrote:
But speaking of HaXml bugs, I'm pretty sure HaXml doesn't handle
% correctly. It seem to treat % specially everywhere, but I think
it is only special inside DTDs. I have many XML files produced by
other tools that the HaXml parser fails to process because of this.
On Feb 16, 2006, at 7:32 PM, John Meacham wrote:
...
Again that doesn't compile, because when requires a ()-returning
monad as its second parameter, but the string parser returns
String.
Same thing with if-then-else, when used to switch IO actions and
such:
the IO actions must fully
Hi all,
my program probably goes into infinite loop... But i cannot understand where
and why.
code:
import System.Directory
data MyFile = MyDir {
dir_name :: String,
dir_files :: [MyFile]
}
| MyFile {
file_name :: String
}
On 2006-02-17 at 20:12GMT rgo wrote:
Hi all,
my program probably goes into infinite loop... But i cannot understand where
and why.
getDirectoryContents will include . and .., so if you
follow those, you're bound to loop.
--
Jón Fairbairn Jon.Fairbairn at
Yep. change one line to:
entry - if isdir name /= . name /= ..
and it does in fact work.
Jared.
On 2/17/06, Jon Fairbairn [EMAIL PROTECTED] wrote:
On 2006-02-17 at 20:12GMT rgo wrote:
Hi all,
my program probably goes into infinite loop... But i cannot understand
where and why.
On 2006-02-17 at 09:22PST Jared Updike wrote:
Yep. change one line to:
entry - if isdir name /= . name /= ..
and it does in fact work.
Only if no-one has been tricky with symbolic links.
--
Jón Fairbairn Jon.Fairbairn at cl.cam.ac.uk
So, consider this code:
import Data.HashTable as HT
class MyClass a where
htLookup :: a - String - IO String
type Context = HT.HashTable String String
instance MyClass Context where
htLookup h var =
do result - HT.lookup h var
case result of
Nothing -
type introduce a type synonym, and Haskell98 forbids these in
instances, so GHC complains. GHC also lifts this restriction when
invoked with -fglasgow-exts .
http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#type-synonyms
Flexible Instances will probably be added
Gerrit van den Geest wrote:
Mark
Mark Jones has (some time ago) also written a very detailed e-mail
about this topic:
http://www.haskell.org/pipermail/haskell/2000-October/006128.html
I really don't understand anything spoken about in this message. I
guess I need it translated into plain
On Fri, 17 Feb 2006 17:19:53 +
Jon Fairbairn [EMAIL PROTECTED] wrote:
On 2006-02-17 at 20:12GMT rgo wrote:
Hi all,
my program probably goes into infinite loop... But i cannot understand
where and why.
getDirectoryContents will include . and .., so if you
follow those, you're bound
That doesn't happen for me at all, it works just fine. Maybe it's
something wrong with your terminal? You could possibly try playing
with the buffering settings on stdout, using hSetBuffering in
System.IO.
- Cale
On 17/02/06, Maurício [EMAIL PROTECTED] wrote:
Dear Haskell users,
I have
On Friday 17 February 2006 21:03, Juan Carlos Arevalo Baeza wrote:
What really got me is that if I don't use a type synonym:
instance MyClass (HT.HashTable String String) where
htLookup h var =
do result - HT.lookup h var
case result of
Nothing -
You're right... I was running the example in rxvt, in cygwin. Now I
tried in Windows command shell and it works.
Thanks,
Maurício
Cale Gibbard wrote:
That doesn't happen for me at all, it works just fine. Maybe it's
something wrong with your terminal? You could possibly try playing
with
Hi,
Apart from the other posts, you might also want to read
http://www.haskell.org/hawiki/IntroductionToIO which is a quick intro
to the way IO is handled in Haskell and
http://www.haskell.org/hawiki/UsingIo which covers similar ground, but
which also goes into a number of other common questions.
Hello All,
Thanks Cale, Udo, Daniel, Lemmih, Ketil, and Marc for your very helpful
posts, and Haskell resources.
Every post really helped a lot.
Thanks for all the help,
Peter
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
35 matches
Mail list logo