I have been thinking a lot about implementing functional lazy language targeting JVM with syntax like:
class Maybe a = Just a | Nothing
implements Monad, Eq when a implements Eq, Ord when a implements Ord
where {
derive Ord;
derive Eq;
override {