[GHC] #13728: Clarify the difference between NameL and NameU in Template Haskell

#13728: Clarify the difference between NameL and NameU in Template Haskell -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Core | Version: 8.0.1 Libraries | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Documentation Unknown/Multiple | bug Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Reading the docs in Language.Haskell.TH.Syntax, I got the impression that when reifying the type {{{#!hs data P a b = P a b }}} defined outside of TH, the type variables a and b will be NameLs; but in my experiments, they come out as NameUs. Are NameLs used anywhere at all? In any case, I think the docs should be updated to explain the difference clearly. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13728 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13728: Clarify the difference between NameL and NameU in Template Haskell -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * component: Core Libraries => Template Haskell Comment: It looks like `NameL`s are used when a quotation in a splice mentions an in-scope variable: {{{ f x = $(do VarE stuff <- [| x |] runIO $ putStrLn $ case stuff of Name _ (NameS {}) -> "NameS" Name _ (NameQ {}) -> "NameQ" Name _ (NameU {}) -> "NameU" Name _ (NameL {}) -> "NameL" Name _ (NameG {}) -> "NameG" [| 0 |]) }}} prints `NameL` when compiled. Yes, this should be clarified in the documentation. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13728#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC