On Thursday 21 August 2003 22:42, Jon Cast wrote:

> > (or any other type I declare it to be).
>
> Right.  But: you can declare it to have type Fractional alpha => alpha,
> which is the same type the constant has in the middle of an expression.

I can make such a declaration, but it still gets converted to Double.

What I can do is turn my constant table into a function:

constant :: Fractional a => String -> a
constant "k_B: = 0.0083144708636327096

and have the return values be of type Fractional a => a. But I suppose there 
is some runtime cost associated with such a function call, so I would rather 
avoid it.

Konrad.

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to