
#14157: Flipping (give :: a -> (Given a => r) -> r) has type (r -> a -> r) -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: RyanGlScott (added) Comment: This isn't limited to `flip`, since you can also trigger similar behavior with a simple redefinition of `give`: {{{ GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/ryanglscott/.ghci λ> :set -XRankNTypes λ> class Given a λ> let give :: a -> (Given a => r) -> r; give = undefined λ> let f x y = give x y λ> :type +v f f :: a -> p -> p λ> :type f f :: a -> p -> p }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14157#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler