Christian Lescher writes:
> [...]
>
> Let's say we restrict it to the types Int and Double. Is an
> automatic conversion at least in this case possible?
You could try wheeling out Haskell's Least Used Keyword:
module Defs where
default(Double, Int)
n = 3 -- This is defaulted to Double
x = 12.3
test = ceiling (x / n)
Other than that, I only know an answer that starts with "Design and
implement a language extension for ...", sorry.
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
- Mixture of Integer and Float arithmetic without ... Christian Lescher
- Mixture of Integer and Float arithmetic wit... Tom Pledger
- Re: Mixture of Integer and Float arithmetic... Christian Lescher
- Re: Mixture of Integer and Float arithmetic... Tom Pledger
- Re: Mixture of Integer and Float arithmetic... Christian Lescher
- Re: Mixture of Integer and Float arithmetic... Marcin 'Qrczak' Kowalczyk
- Re: Mixture of Integer and Float arithm... Malcolm Wallace
- RE: Mixture of Integer and Float arithmetic... Simon Peyton-Jones
- Re: Mixture of Integer and Float arithmetic... Christian Lescher
- RE: Mixture of Integer and Float arithmetic... Simon Peyton-Jones
- GHCi (was Re: Mixture of Integer and Fl... Ross Paterson
