No break spaces
I thought I was going mad when the following code wasn't compiling:
{-# LANGUAGE UnicodeSyntax #-}
{-# LANGUAGE RankNTypes #-}
type F f = forall x . f x
GHC was producing the following error message:
mad.hs:4:21
Illegal symbol '.' in type
Perhaps you intended -XRankNTypes or similar flag
to enable explicit-forall syntax: forall <tvs>. <type>
It turns out that I had somehow inserted a unicode no break space, character code U+00a0
, in the line importing RankNTypes, just after the first #
. Baffling.
This begs the question: should GHC treat this unicode space as an ordinary space when the UnicodeSyntax
extension is enabled? If not should there have been some warning that I had inserted this symbol in a language pragma?
Trac metadata
Trac field | Value |
---|---|
Version | 7.6.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |