[Haskell-cafe] Question on type synonym definition and language extensions

Henning Thielemann lemming at henning-thielemann.de
Thu May 29 16:38:41 EDT 2008

On Thu, 29 May 2008, Olivier Boudry wrote:

> Hi all,
> I'm trying to define a type synonym for 2D MArray instances. The goal is to
> keep the function signature simple and readable using type `Matrix` instead
> of something like `(Ix i, MArray a e m) => m (a i e)`.
> After some "read, guess, try, error" cycles I came up with this:
>    type Matrix = forall m. forall a. forall i. forall n. (Ix i, MArray a n m, Num i, Num n) => m (a (i,i) n)


  type Matrix monad array num = monad (array (Int,Int) num)

ok for you?

More information about the Haskell-Cafe mailing list