[Haskell] simulating dependent types; ghc/ghci discrepancy