Dear Cafe,
and thanks, Georgi, for answering my previous question
here's another difference I noticed
(based on real code, but reduced to a minimal test case)
GHCi, version 9.0.0.20200925: https://www.haskell.org/ghc/ :? for help
Prelude> :set -XRankNTypes
Prelude> let f :: (forall a . a -> ()) -> () ; f = g ; g x = undefined
<interactive>:2:43: error:
• Couldn't match type ‘p0’ with ‘forall a. a -> ()’
Expected: (forall a. a -> ()) -> ()
Actual: p0 -> ()
Cannot instantiate unification variable ‘p0’
with a type involving polytypes: forall a. a -> ()
• In the expression: g
In an equation for ‘f’: f = g
The declaration is accepted by ghc-8.
For ghc-9, I have to give a type signature for g (copy that of f),
or replace `f = g` with `f x = g x`.
- J.W.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.