[Haskell-cafe] Overloading

Donn Cave donn at avvanta.com
Tue Mar 12 23:06:57 CET 2013


On Mar 13, 2013, at 12:54 AM, "Richard A. O'Keefe" <ok at cs.otago.ac.nz> wrote:

> The interesting challenge here is that we should have
> 
>    Date   + Period -> Date      Date   - Period -> Date
>    Period + Date   -> Date      Period - Date   -> ILLEGAL
>    Period + Period -> Deriod    Period - Period -> Period
>    Date   + Date   -> ILLEGAL   Date   - Date   -> Date
> 
> and _also_ (remember we are trying to beat C++ here) Int +/- Int -> Int.

I think I would also want

    Period * Int -> Period
    Period * Period -> ILLEGAL


	Donn



More information about the Haskell-Cafe mailing list