[GHC] #8159: Uses of Binary decode should have a proper error message
GHC
ghc-devs at haskell.org
Fri Aug 23 06:47:41 UTC 2013
#8159: Uses of Binary decode should have a proper error message
-------------------------------------------+-------------------------------
Reporter: nh2 | Owner:
Type: bug | Status: new
Priority: low | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: | Operating System:
Architecture: Unknown/Multiple | Unknown/Multiple
Difficulty: Easy (less than 1 hour) | Type of failure:
Blocked By: | None/Unknown
Related Tickets: | Test Case:
| Blocking:
-------------------------------------------+-------------------------------
In #8144 I changed the interface file format.
That can happen without you noticing because it just uses the Binary
instance.
To deserialize it, we also use Binary. When that fails, the error message
is
{{{
Binary.get(Usage): 50
}}}
The error message should at least also mention:
{{{
Reading the interface file failed
}}}
This is not a specific problem with interface files (it is actually a
minor problem there since ghc will refrain from reading .hi files created
by an older version), but it is in development, and independent from that,
all uses of Binary decode should be guarded as it is a very partial
function.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8159>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list