Re: type signatures with existentially quantified data constructors

2001-08-15 Thread Levent Erkok
How about: === data Expr a = Haskell a | If (Expr Bool) (Expr a) (Expr a) | forall b . Appl (Expr (b->a)) (Expr b) | forall b c . MkPair (Expr b) (Expr c) (b -> c -> a) eval :: Expr a -> a eval (

type signatures with existentially quantified data constructors

2001-08-15 Thread Avi Pfeffer
Hi all, I'm trying to write an interpreter for a language embedded in Haskell, that "inherits" Haskell types and values. So I create a type Expr a, to represent expressions of type a, and an evaluator that takes an Expr a and produces an a. (To keep things simple, let's assume there are no vari

Re: series

2001-08-15 Thread Dylan Thurston
On Wed, Aug 15, 2001 at 02:15:31AM -0300, Luis Pablo Michelena wrote: > hello, i just want to ask a simple question: does somebody have or > know where to find a haskell program that calculates the number e, > that is the list of infinite digits? Because i think it may be > possible to do it, but

How do I export Haskell-functions to C under Linux or Unix?

2001-08-15 Thread Robbert de Haan
Hi, I'm currently working on a project where it would save me a lot of time if I could use the FFI's 'foreign export'-statement, enabling me to call Haskell-functions from C. Unfortunately, I can't get it to work... After reading about various tools and compilers and experimenting with some, I c

Re: series

2001-08-15 Thread Jon Fairbairn
> > hello, i just want to ask a simple question: does > > somebody have or knowwhere to find a haskell program that > > calculates the number e, that is the list of infinite > > digits? > It's a nice problem, which I encountered many years > ago as one of the first examples I saw of lazy e

Re: series

2001-08-15 Thread John Hughes
hello, i just want to ask a simple question: does somebody have or know = where to find a haskell program that calculates the number e, that is = the list of infinite digits? Because i think it may be possible to do = it, but i have

Re: series

2001-08-15 Thread John Hughes
hello, i just want to ask a simple question: does somebody have or know = where to find a haskell program that calculates the number e, that is = the list of infinite digits? Because i think it may be possible to do = it, but i haven=B4t find the way to do it.

series. Reply

2001-08-15 Thread S.D.Mechveliani
Luis Pablo Michelena <[EMAIL PROTECTED]> writes on the subject `series' > where to find a haskell program that calculates the number e, that is > the list of infinite digits? > [..] > what i am looking for is something like the ertostenes sifts, that > prints every prime number until it run

Re: series

2001-08-15 Thread Bernd Holzmüller
You might want to use e n = sum [1 % fak x | x <- [0..n]] and convert it to floating point representation via fromRational (e l) Bernd Holzmüller Luis Pablo Michelena schrieb: > > hello, i just want to ask a simple question: does somebody have or > know where to find a haskell program that c