This is part of some Gofer code that someone sent to me. It's part
of a Gofer experimental prelude, used for defining categorical constructs.
I'm trying to convert it to use in Haskell. Can anybody help?
class Identity hom where
id : hom x x
class Composition hom where
(.) :: hom y z -> hom x y -> hom x z
instance Identity (->) where
id = \x -> x
instance Composition (->) where
g . f = \x -> g (f x)
I also need to be able to define classes with more than one type variable,
i.e. class Category a b where ... I know this is not possible in Haskell,
but is there any way I can get round it?
If anybody can help, I'll be most grateful.
Cheers
Dave Nelson
--
Mail ID : [EMAIL PROTECTED]
Computing Science, University of Newcastle upon Tyne, UK. (091) 222 8789