Automatic Haskell type inference from JSON input