Add support for overloaded string literals.
authorlennart@augustsson.net <unknown>
Thu, 21 Dec 2006 21:01:47 +0000 (21:01 +0000)
committerlennart@augustsson.net <unknown>
Thu, 21 Dec 2006 21:01:47 +0000 (21:01 +0000)
commit90dc9026b091be5cca5da4c6cbd3713ecc493361
treedaa55695147d7dabe0358299275b49b9d00576a2
parent6934648968eaff9873679365dfe50a0f281c2b6e
Add support for overloaded string literals.

The class is named IsString with the single method fromString.
Overloaded strings work the same way as overloaded numeric literals.
In expressions a string literals gets a fromString applied to it.
In a pattern there will be an equality comparison with the fromString:ed literal.

Use -foverloaded-strings to enable this extension.
19 files changed:
compiler/deSugar/Check.lhs
compiler/deSugar/DsExpr.lhs
compiler/deSugar/DsMeta.hs
compiler/deSugar/MatchLit.lhs
compiler/hsSyn/Convert.lhs
compiler/hsSyn/HsLit.lhs
compiler/hsSyn/HsUtils.lhs
compiler/main/DynFlags.hs
compiler/parser/Parser.y.pp
compiler/parser/RdrHsSyn.lhs
compiler/prelude/PrelNames.lhs
compiler/rename/RnEnv.lhs
compiler/rename/RnExpr.lhs
compiler/rename/RnTypes.lhs
compiler/typecheck/Inst.lhs
compiler/typecheck/TcDefaults.lhs
compiler/typecheck/TcHsSyn.lhs
compiler/typecheck/TcPat.lhs
compiler/typecheck/TcSimplify.lhs