labelled types efficiency

Andre W B Furtado awfurtado@uol.com.br
Fri, 8 Mar 2002 00:52:58 -0300


Another question about labelled types, this time concerning about
efficiency: is there any efficiency differences between functions f and g
below?

> data RType = R Int Char
> data Stype = S {x :: Int, y :: Char}
>
> f ::  RType -> Int
> f (R x _) = x
>
> g :: SType -> Int
> g s = x s

Thanks again,
-- Andre