You may use
per-buffer-theme.el. For example you could start with a setup like this:
(setq per-buffer-theme/use-timer t)
(setq per-buffer-theme/timer-idle-delay 0.1)
(setq per-buffer-theme/default-theme 'notheme)
'(((:theme . dichromacy)
haskell-interactive-mode)))) ; Is this the mode the Haskell REPL in Emacs uses? I'm not sure.
In my testing it has worked best with
per-buffer-theme/use-timer set to non-nil. Also, you may want to tell
per-buffer-theme to avoid changing themes for some buffers (say, Help buffers). You can do it with the
(append ido-ignore-buffers '("*Completions*" "*Help*" "*info*" "*Warnings*")
This question had been asked on Stack Overflow a few years ago: Different color themes per mode in Emacs. There are other approaches there but notice that most answers are old and better solutions could have come up since then.
change-major-mode-hookfor major modes, and for minor modes just using its own mode hook), but from my reading that's not remotely what you want. Emacs maintains an arbitrary number of buffers, each of which can have different modes to any others, and switching buffers does not "exit" any of the modes which are active in the buffer you started in -- so reacting to mode changes doesn't help you with your problem.
haskell-modebuffers (possibly along with certain other particular modes) to look different to other buffers. Try elaborating on that requirement, and what you would like to change specifically.