
#8809: Prettier error messages? -------------------------------------+------------------------------------- Reporter: joelteon | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): #8809,#10073,#10179 | Wiki Page: | -------------------------------------+------------------------------------- Comment (by Rufflewind): Replying to [comment:38 dobenour]:
I don't guess that the ''extremely'' hackish approach of using `unsafeInterleaveIO` would work here? The IO action (reading from a file) clearly need not be performed if its result is not used, and we can force it to happen by using `deepSeq` at the appropriate point (to make sure the `SDoc` is fully evaluated).
That would avoid needing the `SDoc` to contain an `IO` action at the expense of using unsafe code.
I found a cleaner workaround for the problem, so IO actions in SDocs are no longer necessary. https://phabricator.haskell.org/D2718 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8809#comment:39 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler