> I errorneously specified categories as
> 
> class (Eq object, Eq morphism) => 
>       Category id object morphism | id ->, id -> morphism
>   where  o :: id -> morphism -> morphism -> Maybe morphism
>          dom, cod :: id -> morphism -> object
> 
> it should have been
> 
> class (Eq object, Eq morphism) => 
>       Category id object morphism | id -> object, id -> morphism
>   ...                                     ^^^^^^
> 
> - but ghci 5.02.2 does not complain. Why?

The syntax of a functional dependency is (from GHC's parser):

   fd : varids0 '->' varids0

   varids0 
        : {- empty -}
        | varids0 tyvar

so the list of tyvars on either side of the '->' can be empty.
Functional dependency experts can correct me if I'm wrong, but I imagine
though that 'a ->' is not a very useful functional dependency (isn't it
the same as giving no functional dependency at all?), and '-> a' means
that there can only ever be one instantiation for 'a' in the whole
program.

Cheers,
        Simon
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to