On 2004-07-23 at 19:18+0300 Kari Pahula wrote:
> temp :: (Real a) => Object (Energy a) (HeatC a) -> Temp a
> temp Object (Energy e) (HeatC c) = Temp e*c
> 
> But this fails in hugs with:
> ERROR "temp.hs":22 - Constructor "Object" must have exactly 2 arguments in pattern

You've given temp three arguments: Object, (Energy e) and (HeatC c).

You meant:

> temp (Object (Energy e) (HeatC c)) = Temp e*c

HTH

-- 
J�n Fairbairn                                 [EMAIL PROTECTED]


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

Reply via email to