
#15928: Reduction stack overflow when using "coerce" -------------------------------------+------------------------------------- Reporter: harendra | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by harendra): Thanks for patiently and promptly explaining the problem. I appreciate that. Phantom role explains the inconsistency and everything falls in place. I did not realize it, to create an absolutely minimal example I removed the use of the parameter and it became phantom, it was not so in the original code. I like the `coerce` feature and I am perfectly ok with the theory as long as the behavior is documented, errors are easy to understand and the documentation is discoverable. So perhaps we can make the error message better, if you think it can be improved. Does it make sense to spit out the role information in the error message? We can also add one or more examples to explain the pitfalls/incompleteness in the user guide. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15928#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler