>> How about inserting one more parameter, "action", in your class >> definition: >> class (Ord st) => MinimaxState st action where >> successors:: st -> [(action,st)] >> terminal:: st -> Bool >> instance MinimaxState Int Int where >> terminal i = i == 0 >> successors i = [(1,i+1), (-1,i-1)]
> I'd rather not do that, but even if I did, the type-variable action > would not be reachable in the terminal function. I could specify a > functional dependency st -> action (though I've never used it, it would > be a fun to learn). Right... you need the functional dependency because of "terminal", and in general a type annotation for using it. Carlos _______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
