I have 2 type definitions
type Mapper a k v = a -> [(k,v)]
type MapperM m a k v = a -> m [(k,v)]
I want to write a function that convert a value from type
(Ord k, Monad m) => MapperM m a k v
to type
Ord k => Mapper a k v
basically a function that takes a -> m [(k,v)] as an argument and return a -> [(k,v)] as output.
All my attempts are failing with the Haskell type checks.