Hi all,

I'm working through Brown & Cook's "Monadic Memoization Mixins" and have come across some code that I can't get to compile with GHC.

The error I get for

arrayDict :: (MArray arr (Maybe b) m, Ix a, Ord a)
          => a -> arr a (Maybe b) -> Dict a b m

is
    Non type-variable argument
      in the constraint: MArray arr (Maybe b) m
    (Use -XFlexibleContexts to permit this)
    In the type signature for `arrayDict':
      arrayDict :: (MArray arr (Maybe b) m, Ix a, Ord a) =>
                   a -> arr a (Maybe b) -> Dict a b m

Enabling FlexibleContexts causes other errors.  What could be going wrong?
In case this isn't enough context, I've posted the full source code for this section of the paper at smipple.

Thanks in advance for any help,
Perry