#4197: clarify which names can not be quoted
---------------------------------+------------------------------------------
Reporter: maeder | Owner:
Type: task | Status: new
Priority: low | Milestone: 7.6.1
Component: Documentation | Version: 6.12.3
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by maeder):
http://www.haskell.org/ghc/docs/7.4.1/html/users_guide/syntax-extns.html
#syntax-stolen
wrongly mentions `-XPolyKinds` in:
{{{
'varid
Stolen by: -XTemplateHaskell and -XPolyKinds
}}}
http://www.haskell.org/ghc/docs/7.4.1/html/users_guide/template-
haskell.html
{{{
'f has type Name, and names the function f. Similarly 'C has type Name and
names the data constructor C. In general 'thing interprets thing in an
expression context.
}}}
should be extended: "Names f or C that form (or start with) a legal
character if quoted, cannot be quoted."
{{{
Prelude> let a' = 1
Prelude> :t 'a'
'a' :: Char
Prelude> let ab' = 1
Prelude> :t 'ab'
'ab' :: Language.Haskell.TH.Syntax.Name
Prelude> let a'' = 1
Prelude> :t 'a''
<interactive>:1:5:
lexical error in string/character literal at end of input
Prelude> let a'a' = 1
Prelude> :t 'a'a'
<interactive>:1:1:
The function 'a' is applied to one argument,
but its type `Char' has none
In the expression: 'a' a'
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4197#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs