Scott Lawrence wrote:
> More specifically, I have
>
>  class Model m a | m -> a where ...
>  class Entropy d where ...
>  instance (Model m a) => Entropy m where ...
>
> The first line requires MultiParamTypeClasses and
> FunctionalDependencies... the third
> requires UndecidableInstances...
> Is this likely to cause a problem?

Yes.

You almost never want to use UndecidableInstances
when writing practical programs in Haskell.
When GHC tells you that you need them, it almost
always means that your types are poorly designed,
usually due to influence from previous experience
with OOP.

Your best bet is to step back and think again about
the problem you are trying to solve. What is the
best way to formulate the problem functionally?
That will lead you in the right direction. Please
feel free to share more details about what you are
trying to do. We would be happy to help you work out
some good directions.

Regards,
Yitz

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to