
#14664: "GHC.Integer can't throw exceptions" is wrong -------------------------------------+------------------------------------- Reporter: Zemyla | Owner: (none) Type: feature request | Status: new Priority: low | Milestone: 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 Zemyla): Well, yeah, this was mostly a proof of concept, and I don't know how exactly to make it support unboxed as well as boxed types, though I'm pretty sure it's possible. But yeah, a primop like `primError# :: Addr# -> a` that takes a zero- terminated string literal and throws a specific type of error hardcoded into the RTS and defined later in Control.Exception might work. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14664#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler