On 11 April 2010 22:54, Jason Dagit <[email protected]> wrote:

>
>
...
>

>
class Vehicle a where
>
> data Car
> data Truck
>
> instance Vehicle Car where
> instance Vehicle Truck where
>
> Now you can have things that take a Car or a Truck or they can take a
> Vehicle instead.
>
> moveVehicle :: Vehicle v => v -> Simulation ()
>
>
unfortunately, now you cannot use pattern matching while defining
moveVehicle.

...
>

>
Jason
>
>


-- 
Ozgur Akgun
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to