Skip to content

Interpreter is treating a comment character as an identifier character.

When bringing dhall-lang up in a REPL I stumbled across a warning about a character in a haddock comment. Should the interpreter be treating a comment character as an identifier character?

https://github.com/dhall-lang/dhall-haskell/issues/646#issuecomment-430776320

{-# LANGUAGE CPP #-}

data Expr s a
    -- | > Combine x y ~ x ∧ y
    = Combine (Expr s a) (Expr s a)
> stack runghc -- --interactive Intersect.hs

Intersect.hs:13:29: error:
     warning: treating Unicode character <U+2227> as identifier character
     rather than as '^' symbol [-Wunicode-homoglyph]
        -- | > Combine x y ~ x ∧ y
                               ^
   |
13 |     -- | > Combine x y ~ x ∧ y
   |                            ^
1 warning generated.

> stack runghc -- --version
runghc 8.4.3

There's a unicode-homoglyph repo with the reproduction.

Trac metadata
Trac field Value
Version 8.4.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown/Multiple
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information