RE: fundeps known beforehand (was RE: fundeps for extended Monad definition)

2003-02-28 Thread Simon Peyton-Jones
| since this claims that it will take a Bool and produce a value of type b | for all types b. However, would it be all right to say (in | pseudo-Haskell): | | > f :: exists b . Bool -> b | > f x = x But this is a singularly useless function, because it produces a result of utterly unknown type,

Happy Alex

2003-02-28 Thread Per Larsson
I have successfully used the the excellent haskell tools Happy and Alex in a couple of parsing projects, but I have failed when trying to combine a monadic Happy grammar (using the %monad and %lexer directives) together with an Alex generated okenizer, nor are there any such examples in the Hap

RE: Happy Alex

2003-02-28 Thread Simon Marlow
> I have successfully used the the excellent haskell tools > Happy and Alex in a > couple of parsing projects, but I have failed when trying to > combine a > monadic Happy grammar (using the %monad and %lexer > directives) together with > an Alex generated okenizer, nor are there any such e

Anyone calculating Nash or Wardrop equilibria in Haskell?

2003-02-28 Thread Steffen Mazanek
Hello. Haskells declarativity is really useful to transform mathematical models into data types and algorithms. In the context of a seminary I have dealt with equilibria concepts (especially Nash and Wardrop equilibrium) in loss networks. (based on "Non-cooperative routing in loss networks" by Al

RE: fundeps for extended Monad definition

2003-02-28 Thread Hal Daume III
> The reason, which is thoroughly explained in Simon Peyton-Jones' > message, is that the given type signature is wrong: it should read > f1 :: (exists b. (C Int b) => Int -> b) Right. Simon pointed out that this is a pretty useless function, but not entirely so, since the result of it is n

One-month alert to ICFP submission deadline

2003-02-28 Thread Olin Shivers
The submission deadline for ICFP -- the International Conference on Functional Programming -- is coming up soon: Saturday, March 29, which is four weeks away. The 2003 ICFP will be in Uppsala, Sweden on August 25-29, in conjunction with PPDP (Principles and Practice of Declarative Programming). Pl

RE: fundeps for extended Monad definition

2003-02-28 Thread oleg
Hello! It seems we can truly implement Monad2 without pushing the envelope too far. The solution and a few tests are given below. In contrast to the previous approach, here we lift the type variables rather than bury them. The principle is to bring the type logic programming at the level

int to float problem

2003-02-28 Thread Mike T. Machenry
Hello, I am having a problem. I recently desided I wanted a bunch function to return float instead of Int. I changed their type and wrote a new function that returned a float. I figured it'd be okay if all the others still returned Int since it's trivial to convert Int to Float. Sadly Haskell wo

Re: int to float problem

2003-02-28 Thread Wang Meng
Try intToFloat :: Int -> Float intToFloat n = fromInteger (toInteger n) -W-M- @ @ | \_/ On Fri, 28 Feb 2003, Mike T. Machenry wrote: > Hello, > > I am having a problem. I recently desided I wanted a bunch function to return > float instead of Int. I changed their type and wro

Re: int to float problem

2003-02-28 Thread Lennart Augustsson
Use the Prelude function realToFrac. -- Lennart Mike T. Machenry wrote: Hello, I am having a problem. I recently desided I wanted a bunch function to return float instead of Int. I changed their type and wrote a new function that returned a float. I figured it'd be okay if all the others st