
#15156: Show instances for types exported from the ghc package -------------------------------------+------------------------------------- Reporter: sjakobi | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 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 sjakobi): Replying to [comment:1 alexbiehl]:
While 'show' would be nice for now you can use 'ppr' and 'showSDocUnsafe' from 'Outputable'.
Thanks for the tip, Alex! I had come accross `showSDocUnsafe` before, but was scared off by its documentation: {{{ -- showSDocUnsafe is unsafe, because `unsafeGlobalDynFlags` might not be -- initialised yet. }}} I felt like I had no reason to assume that `unsafeGlobalDynFlags` was initialised. The function might be less scary if there was a comment explaining under what circumstances `unsafeGlobalDynFlags` ''is'' initialised. For my immediate needs, I made do with a few orphan instances. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15156#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler