[Haskell] class variable dynamic inference