On Tue, Mar 15, 2005 at 10:44:28AM +, Ross Paterson wrote:
> On Mon, Mar 14, 2005 at 07:38:09PM -0600, John Goerzen wrote:
> > I've got some gzip (and Ian Lynagh's Inflate) code that breaks under
> > the new hugs with:
> >
> > : IO.getContents: protocol error (invalid character encoding)
> >
term :: Parser Int
term = do f <- factor
do symbol "*"
e <- expr
return (f * t)<--- replace t with e
+++ return f
I hope that helps,
Carter Schonwald
___
Haskell-Cafe ma
Hi,
When I use the
htmlWindowLoadPage hw "./test.html"
function, everything works fine and I see the content of the test.html page.
Cheers
Patrick
On Tuesday 15 March 2005 15:51, David Owen wrote:
> Good day all,
>
> I am attempting to display html pages using wxHaskell's HtmlWindow
> func
> From: David Owen [mailto:[EMAIL PROTECTED]
>
> htmlWindowSetPage might be the wrong function to use for this
> or I might
> just be using it incorrectly. This may well be more
> complicated than I'm
> hoping it is too!
I-Am-Not-A-WxHaskell-Expert, but... a quick google finds this page:
Thanks folks!
Writing it in a lispy manner seems to work. I see what Arthur means about the
layout - I think I'm still thinking too much in C. :)
Nik
Dr Nik Freydís Whitehead
University of Akureyri, Iceland
*
Having the moral h
The layout of your code is very important when writing haskell code:
Your code :
expr = do t <- term
do symbol "+"
e <- expr
return e
return (t + e)
+++ return t
is equivalent to:
expr = do { t <- term
; do { symbol "+"
;
On Tue, Mar 15, 2005 at 03:44:55PM -, Nicola Whitehead wrote:
> perhaps like this:
>
> > expr = do t <- term
> > (do symbol "+"
> > e <- expr
> > return (t+e)
> > )
> > +++
> > (return t)
> >
> >although I think you may also w
perhaps like this:
> expr = do t <- term
> (do symbol "+"
> e <- expr
> return (t+e)
> )
> +++
> (return t)
>
>
>although I think you may also want a 'try' before the first alternative.
No, that still gives the same undefined var
expr :: Parser Int
expr = do t <- term
do symbol "+"
e <- expr
return e
return (t + e)
+++ return t<-
't' is not in scope at the arrow. t only exists inside the
do block, and your code parses like this
( do t <- return (t+e) )
On Tue, 15 Mar 2005, Nicola Whitehead wrote:
Curiouser and curiouser...
expr :: Parser Int
expr = do t <- term
do symbol "+"
e <- expr
return (t + e)
+++ return t
solves the undefined variable problem but introduces a new 'Last
operator in do {...} must be an ex
Curiouser and
curiouser...
expr ::
Parser Intexpr = do t <-
term do symbol
"+" e
<- expr return (t +
e) +++ return t
solves the undefined
variable problem but introduces a new 'Last operator in do {...} must be an
_expression_' error, which then disa
Good day all,
I am attempting to display html pages using wxHaskell's HtmlWindow
functions. I am hoping that it is indeed possible for me to do just that
and that I haven't misunderstood what HtmlWindow is used for.
My code so far will create a frame, a button and an HtmlWindow and other
assor
On Tue, 15 Mar 2005, Ben Rudiak-Gould wrote:
Henning Thielemann wrote:
I' searching for a function which sorts the numbers and determines the
parity of the number of inversions. I assume that there are elegant and
fast algorithms for this problem (n * log n time steps), e.g. a merge sort
algorit
On Tue, Mar 15, 2005 at 08:12:48AM -0600, John Goerzen wrote:
> > [...] but Hugs is now much stricter, because character streams now
> > use the encoding determined by the current locale (for the C locale, that
> > means ASCII only).
>
> Hmm, this seems to be completely undocumented.
It's mention
On Tue, Mar 15, 2005 at 10:44:28AM +, Ross Paterson wrote:
> On Mon, Mar 14, 2005 at 07:38:09PM -0600, John Goerzen wrote:
> > I've got some gzip (and Ian Lynagh's Inflate) code that breaks under
> > the new hugs with:
> >
> > : IO.getContents: protocol error (invalid character encoding)
> >
On 15 Mar 2005, at 12:38, Mark Carroll wrote:
Variables (although why they're
called that in Haskell I'm not sure)
Because the value that they denote can vary between different calls of
the same function?
Jules
___
Haskell-Cafe mailing list
Haskell-Cafe
Henning Thielemann wrote:
I' searching for a function which sorts the numbers and determines the
parity of the number of inversions. I assume that there are elegant and
fast algorithms for this problem (n * log n time steps), e.g. a merge
sort algorithm.
This is a rather nice little problem. I t
On Tue, 15 Mar 2005, Nicola Whitehead wrote:
(snip)
> term :: Parser Int
> term = do f <- factor
>do symbol "*"
>e <- expr
>return (f * t)
> +++ return f
(snip)
> symbol and natural are defined elsewhere and work fine, but when I compile it
On Tue, 15 Mar 2005, Nicola Whitehead wrote:
Hi folks,
I have a parser problem. I have a basic calculator program (Graham Hutton's
from Nottingham) which contains the following code:
-- Define a parser to handle the input
expr :: Parser Int
expr = do t <- term
do symbol "+"
Hi
folks,
I have a parser
problem. I have a basic calculator program (Graham Hutton's from Nottingham)
which contains the following code:
-- Define a parser
to handle the inputexpr :: Parser Intexpr = do t <-
term
do symbol
"+"
e <-
expr
On Mon, Mar 14, 2005 at 07:38:09PM -0600, John Goerzen wrote:
> I've got some gzip (and Ian Lynagh's Inflate) code that breaks under
> the new hugs with:
>
> : IO.getContents: protocol error (invalid character encoding)
>
> What is going on, and how can I fix it?
A Haskell 98 Handle is a charac
21 matches
Mail list logo