2009/1/23 Austin Seipp <mad....@gmail.com>: > > The code is attached to this message; the problem is in the normalize > function: > >> normalize :: (Modular s a, Integral a) => a -> M s a >> normalize a = M (mod a (modulus (u :: s)))
"s" isn't scoped over the definition of "normalize" in this definition. You need an explicit "forall". normalize :: forall s a. (Modular s a, Integral a) => a -> M s a normalize a = M (mod a (modulus (u::s))) See section 8.8.6 of the GHC manual. <http://www.haskell.org/ghc/docs/latest/html/users_guide/other-type-extensions.html#scoped-type-variables> -- Dave Menendez <d...@zednenem.com> <http://www.eyrie.org/~zednenem/> _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users