#5255: String literals cause runtime crashes when OverloadedStrings is in effect
---------------------------------+------------------------------------------
Reporter: YitzGale | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.0.3
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by simonpj):
OK, so this is largely a question of syntactic overhead.
I still think TH is the right mechanism, regardless of the syntax
* TH is GHC's only mechanism for guaranteeing compile time evaluation
* It hooks into the error reporting monad, so you get proper civilised
error messages with decent line numbres. Something based on "`evaluate
(packBS "foo{name")`" at compile time will not.
* Adding interaction with overloading is even worse. What is supposed to
happen for
{{{
f :: IsString s => [s]
f = ["foo", "bar{n"]
}}}
You can't do this statically.
That said, I don't see a way to achieve what you want with zero syntactic
overhead.
Still, if you can think of a quieter notation for quasiquoting, sing out.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5255#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs