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 (
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
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
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
> > 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
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
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.
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
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