xs :: [Int] <- ...
does not work without `ScopedTypeVariables` (and I don't like proliferation of redundant language extensions).In Rust, sure, it's not a problem and plays well with the language.
My point is, it is easy to abuse this feature (this example is from Haskell Prelude!), even though it is indispensable in some situations (like `mempty :: a`).
xs <- map read <$> lines <$> getContents :: IO [Int]
Or you can force the xs type on some other line: let _ = xs :: Int
There is a recent idiom for that last format that lets you write on the same line as the expression. I think it's something like: (xs @ [Int]) <- map read <$> lines <$> getContents
But I haven't used it yet and I am not sure exactly what version of GHC allows it.It does something useful for you! How can it be redundant?
What are the alternatives? Completely discarding the language standard? Never making attempts to improve the language? Requiring all experiments to go through a standardization committee before real-world testing?
None of those strike me as obviously better.
If I already have `ScopedTypeVariables` in scope for other valid reasons, I am happy to use it. It's just that I'd rather not enable it for tiny cosmetic improvement like this.