FIX Trac #1332: make isStringTy work right
authorsimonpj@microsoft.com <unknown>
Mon, 7 May 2007 10:41:37 +0000 (10:41 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 7 May 2007 10:41:37 +0000 (10:41 +0000)
commit43f19eec0ec4c507be2391d66ff53e79a8580561
treed6763e508462cb55cb35062cb775481d1960eb29
parentfd8f8c6a4d1d5a91c0095804a9ada86c42d64141
FIX Trac #1332: make isStringTy work right

For some ancient reason, TcType.isStringTy was treating newtypes as
transparent, which is quite consistent with isIntTy, isBoolTy etc.
(I think the reason is that isStringTy was written to go with isFFIDotNetTy,
which deals in representation types.)

Anyway, this inconsistency is Utterly Wrong when called from
Inst.shortCutStringLit, and that made tc224 fail.  I can't think how
it ever succeeded.  Maybe it never did!

Anyway this fixes it. It may be that .NET FFI calls are not quite as
permissive, but they are almost certainly broken in more serious ways,
so I'm going to jump that bridge if we come to it.
compiler/typecheck/TcType.lhs