
#14363: :type hangs on coerce -------------------------------------+------------------------------------- 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: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): `Functor` constraint not needed to make it hang {{{ Prelude Data.Coerce> contra = undefined :: (a -> b) -> (f b -> f a) Prelude Data.Coerce> :t [contra, coerce] ^CInterrupted. }}} Giving it a concrete type gives an actual failure {{{ Prelude Data.Coerce> contra = undefined :: (a -> b) -> (Maybe b -> Maybe a) Prelude Data.Coerce> :t [contra, coerce] <interactive>:1:10: error: • Occurs check: cannot construct the infinite type: b ~ Maybe (Maybe b) arising from a use of ‘coerce’ • In the expression: coerce In the expression: [contra, coerce] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14363#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler