
Hi, without adding much to the discussion, I agree with Roman’s sentiment here. And maybe that is an indication that more people out there, who are not as deep into the theory and implementation of this feature, will be similarly surprised. Am Montag, den 26.03.2018, 09:24 +0000 schrieb Simon Peyton Jones:
Also, you can readily do what you want with an ordinary type signature in a pattern
h (C n :: C Int) = n -- infers h :: C Int -> Int
Isn’t that true for most uses of TypeApplications in expressions as well, that they could readily be replaced by type signatures? And yet we offer the TypeApplications extension? Here is another example where the current proposal superficially breaks the nice equational nature of Haskell: data U a where MkU :: forall a b. Show a => b -> T a idU :: forall a. U a -> U a idU (MkU @b x) = MkU @a @b x or even idU :: forall a. U a -> U a idU (MkU @b x) = MkU @a x It is the identity! Why don’t I write the same things on both sides? I think all reserverations would disappear if we can find a good syntax for existential type variable that does not clash with TypeApplication. Maybe @? instead of @ (given that ? is commonly used to refer to ∃)? Cheers, Joachim -- Joachim Breitner mail@joachim-breitner.de http://www.joachim-breitner.de/