Re: URI handling code in Haskell available

2003-03-05 Thread Johannes Waldmann
On Wed, 5 Mar 2003, Graham Klyne wrote: > I've released a first version of some URI parsing and handling code at: >http://www.ninebynine.org./Software/HaskellURI.zip but this library is already in ghc: http://www.haskell.org/ghc/docs/latest/html/network/Network.URI.html best regards -- -- J

Re: int to float problem

2003-03-05 Thread b . i . mills
> I agree with what you said, > but I think you may have missed my point. Sounds likely on both counts. The same thing annoys me, but my work is in exact or symbolic: -- I don't claim this is a practical example -- I'm just saying that it is logically plausible denominator 2 % 3 == 3

Re: int to float problem (resend with addendum)

2003-03-05 Thread Matthew Donadio
[EMAIL PROTECTED] wrote: > Basically, from the algebraic perspective, the float type is > a messy fudge, and does not fit in nicely with any of the > "pure" types. In general the containment I agree with what you said, but I think you may have missed my point. In numeric programming, at least wha

Re: Function wows

2003-03-05 Thread Steffen Mazanek
Hello, > frombin :: [Bit] -> Int > > frombin [] = 0 > > frombin (n:ns) = sum (n:( frombin (map (*2) ns))) frombin takes a list of Bits and returns an Int, but (:) needs a list as its second argument. Try something like > frombin (n:ns) = n + 2*(frombin ns) or >frombin = foldr (\x y->x+2*y) 0

(no subject)

2003-03-05 Thread b . i . mills
To <[EMAIL PROTECTED]> Subject: Re: int to float problem In-Reply-To: <[EMAIL PROTECTED]> Yo, > Haskell Integers are not a proper subset of Haskell Floats or > Doubles. Haskell does not support real numbers. I'd just like to add ... Real numbers are not implementable on a digital computer. Thi

Conway's Life

2003-03-05 Thread Abraham Egnor
I'm implementing Conway's Life in Haskell; my basic implementation is attached. Does anyone have suggestions for optimizations (or alternative representations)? It's interesting to note that the difference between this with no ghc optimization, -O, and -O2 is pretty striking; on my computer, it's

Re: fundeps for extended Monad definition

2003-03-05 Thread oleg
Ashley Yakeley wrote: > If this were allowed, it would effectively allow type-lambda > class C a b | a -> b > instance C Int Bool > instance C Bool Char > newtype T a = MkT (forall b.(C a b) => b) > helperIn :: (forall b.(C a b) => b) -> T a > helperIn b = MkT b; -- currently won't work > helper

Re: int to float problem (resend with addendum)

2003-03-05 Thread b . i . mills
I just fluffed the To: field in the header, so my previous message was bounced, I'm resending this ... sorry if it turns up twice. (I also took the opportunity to make an addendum). Yo, > Haskell Integers are not a proper subset of Haskell Floats or > Doubles. Haskell does not support real

Function wows

2003-03-05 Thread Robert Perren
As part of a larger program I have created the following functions to convert a list of bits into the integer represents, also to simplify things the order of the bits is reversed [1,1,0,1] represents 1011 (or 13). At the moment the frombin function below works fine.   type Bit = Int  

URI handling code in Haskell available

2003-03-05 Thread Graham Klyne
I've released a first version of some URI parsing and handling code at: http://www.ninebynine.org./Software/HaskellURI.zip With a (very) few words of write-up at: http://www.ninebynine.org./Software/ReadMe-URI-Haskell.txt The URI parser code is based very closely on the syntax specification

Haskell Web Server Was Re: HTTP protocol libraries

2003-03-05 Thread shae
"Bayley, Alistair" <[EMAIL PROTECTED]> writes: > On a related note, what happened to the source code for the Haskell Web > Server? > > http://research.microsoft.com/~simonmar/hws.tar.gz > > Is it no longer suitable for public consumption? (I have a copy at home > somewhere, though). There's also

RE: HTTP protocol libraries

2003-03-05 Thread Simon Marlow
> From: Bayley, Alistair [mailto:[EMAIL PROTECTED] > > On a related note, what happened to the source code for the > Haskell Web > Server? > > http://research.microsoft.com/~simonmar/hws.tar.gz > > Is it no longer suitable for public consumption? (I have a > copy at home somewhere, though).

RE: HTTP protocol libraries

2003-03-05 Thread Bayley, Alistair
On a related note, what happened to the source code for the Haskell Web Server? http://research.microsoft.com/~simonmar/hws.tar.gz Is it no longer suitable for public consumption? (I have a copy at home somewhere, though). -Original Message- From: Johannes Waldmann [mailto:[EMAIL PROTEC

HTTP protocol libraries

2003-03-05 Thread Johannes Waldmann
Dear all, I am looking for a Haskell library for the HTTP/1.1 protocol, i. e. data types for Requests and Responses, and functions to read chunked bodies etc. Is there such a thing? -- -- Johannes Waldmann http://www.informatik.uni-leipzig.de/~joe/ -- -- [EMAIL PROTECTED] -- phone/fax (+49) 3

AW: Parsec: GHC /= Hugs?

2003-03-05 Thread Markus . Schnell
> Try the November release of Hugs with the +N option. Well, now Hugs and ghc show the same behaviour for my program: they don't parse my doc, even with the same error. But the +N does not work: it says "New hierarchical libraries not found along search path; ignoring +N toggle." I tried adding

Re: Parsec: GHC /= Hugs?

2003-03-05 Thread Ross Paterson
On Tue, Mar 04, 2003 at 04:00:53PM +0100, [EMAIL PROTECTED] wrote: > My program has a different behaviour under hugs and ghc. > > I wrote a very simple parser with Parsec and it parses a file quite easily - > as long as > I use hugs to run it. But when I compile it with ghc, the parse fails. > (I'

RE: GUI for Windows

2003-03-05 Thread Guest, Simon
Hi Markus, I use FranTk with ghc 5.04.2 on windows, and it works just fine. It provides a high level of abstraction, which is what I find particularly compelling. To build it with ghc 5.04 I had to patch it a little. Only trivial things like: in src/FRPSrc/StaticTypes/Compatibility.ghc.hs, yo

Re: fundeps for extended Monad definition

2003-03-05 Thread Ashley Yakeley
In article <[EMAIL PROTECTED] ft.com>, "Simon Peyton-Jones" <[EMAIL PROTECTED]> wrote: > Here's a less complicated variant of the same problem: > > class C a b | a -> b where {} > > instance C Int Int where {} > > f :: (C Int b) => Int -> b > f x = x > > Is the defn o

RE: First-class types

2003-03-05 Thread Simon Peyton-Jones
| 1) Coerce a a can be defined as coerce=id for all a. However, this |may of course lead to overlap in the type structure, so we must |write a separate instance definition for Coerce Int Int, Coerce |Double Double, etc. if we want types to be decidable. I'd love for |some clever

RE: big lambda in class declarations

2003-03-05 Thread Simon Peyton-Jones
Big lambda is in terms. You mean a "lambda at the type level", which is usually written as a small lambda. Confusing, I know. There's an ICFP02 paper on the subject, by Thiemann et al. Worth a read. Problem with inference is that the type checker can't guess lambdas. Suppose we need to unify