Skip to content

template haskell mkName parses operator ^.. as a qualified operator

The operator ^.. (provided by lens) is parsed as the operator . from module ^. In other words:

import Language.Haskell.TH.Syntax
main = case mkName "^.." of
   Name (OccName ".")  (NameQ (ModName "^")) -> error "bug"
   Name (OccName "^..") NameS                -> print "desired"

The context here is that I get ^.. out-of-scope when I try to use that operator in code that is handled by haskell-src-meta.

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