RFC: Unicode primes and super/subscript characters in GHC

Herbert Valerio Riedel hvr at gnu.org
Mon Jun 16 07:44:06 UTC 2014


On 2014-06-16 at 02:26:49 +0200, Mateusz Kowalczyk wrote:

[...]

> While personally I like the proposal (wanted prime and sub/sup scripts
> way too many times), I worry what this means for compatibility reasons:
> suddenly we'll have code that fails to build on 7.8 and before because
> someone using 7.9/7.10+ used ′ somewhere. 

Fwiw, we already had that situation. The following code

    {-# LANGUAGE UnicodeSyntax #-}
    
    module Foo where
    
    x₀ ∷ Double
    x₀ = 1.5

compiles with GHC ≥ 7.2, but with GHC 7.0 fails with:

    GHCi, version 7.0.4: http://www.haskell.org/ghc/  :? for help
    [1 of 1] Compiling Foo              ( foo.hs, interpreted )
    
    foo.hs:5:2: lexical error at character '\8320'
    Failed, modules loaded: none.


Cheers,
  hvr


More information about the Glasgow-haskell-users mailing list