I'm getting the Illegal type signature in instance declaration error and I have no idea why it is popping up for my program. Indentation seems right, etc. I hope you can help me.
class Game g s | g -> s where
findPossibleMoves :: Player -> g -> [(s,g)]
identifyWinner :: g -> Player -> Maybe Player
instance Game HForest HStrategy where
identifyWinner :: HForest -> Player -> Maybe Player
identifyWinner ts p = getWinner $ getLeaves ts
findPossibleMoves :: Player -> HForest -> [(HStrategy, HForest)]
findPossibleMoves p ts = map (\s -> (s,move s ts)) $ getStrategies p ts
The error is :
Illegal type signature in instance declaration:
findPossibleMoves :: Player -> HForest -> [(HStrategy, HForest)]
(Use InstanceSigs to allow this)
In the instance declaration for `Game HForest HStrategy'