I have already seen a variety of questions of the form "Given type signature XXX
, find implementation in Haskell." Therefore it is natural to ask whether this can be generalized or algorithmized. A similar question is here. However, it is clear that generally this task is impossible. So the next question is to trade some generality for practicality.
Question: Is the problem decidable if all the type signatures consists of rigid type variables together with some constraints, drawn from a fixed set (e.g.
Monad, Traversable, Foldable
?)
A typical problem would be (Monad m) => (m j -> [m d]) -> m [j] -> [m [d]]
, where I used []
instead of (..Constraints t) => t
for convenience.