I've been running into a problem where I'd like to modify a container type
based on a body of existing code to be a Functor. A difficulty seems to be
that parts of the container type are based on a type constructor where the
underlying type 'a' over which "fmap :: (a->b) -> t a -> t b" would op
On Tue, 10 Jun 2003 11:44:45 -0700 (PDT)
[EMAIL PROTECTED] wrote:
>
> > update :: (Typable b) => FM k -> Key k a -> b -> (FM ...)
>
> I didn't know constraints on values are allowed... Given below is the
> implementation of the required interface, in Haskell98
They aren't presumably as that wo
>
> > > - Great care should be exercised in the use of this function. Not only
> > > - because of the danger of introducing side effects, but also because
> > > - \code{unsafePerformIO} may compromise typing, for example, when it is used
> > > - in conjunction with polymorphic references.
> >
> >
> update :: (Typable b) => FM k -> Key k a -> b -> (FM ...)
I didn't know constraints on values are allowed... Given below is the
implementation of the required interface, in Haskell98
module TypedFM where
data FM k -- Abstract; finite map indexed bykeys of type k
data Ke