summaryrefslogtreecommitdiff
path: root/testsuite/tests/printer
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2023-02-06 11:37:57 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-02-07 10:51:33 -0500
commitb17fb3d96bd2e9f3bf96392f3b3b3e0aed7fe276 (patch)
tree7cbe5149ce969707f75e3dfacf8dc350ec69500c /testsuite/tests/printer
parent3e09cf82ad111e0a6feed81b726849ceaaf3c805 (diff)
downloadhaskell-b17fb3d96bd2e9f3bf96392f3b3b3e0aed7fe276.tar.gz
Don't allow . in overloaded labels
This patch removes . from the list of allowed characters in a non-quoted overloaded label, as it was realised this steals syntax, e.g. (#.). Users who want this functionality will have to add quotes around the label, e.g. `#"17.28"`. Fixes #22821
Diffstat (limited to 'testsuite/tests/printer')
-rw-r--r--testsuite/tests/printer/Test22771.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/testsuite/tests/printer/Test22771.hs b/testsuite/tests/printer/Test22771.hs
index b935a511d0..c711471fb6 100644
--- a/testsuite/tests/printer/Test22771.hs
+++ b/testsuite/tests/printer/Test22771.hs
@@ -14,8 +14,9 @@ import GHC.Prim (Addr#)
instance KnownSymbol symbol => IsLabel symbol String where
fromLabel = symbolVal (Proxy :: Proxy symbol)
-(#) :: String -> Int -> String
+(#), (#.) :: String -> Int -> String
(#) _ i = show i
+_ #. i = show i
f :: Addr# -> Int -> String
f _ i = show i
@@ -28,13 +29,13 @@ main = traverse_ putStrLn
, #type
, #Foo
, #3
- , #199.4
+ , #"199.4"
, #17a23b
, #f'a'
, #'a'
, #'
, #''notTHSplice
- , #...
+ , #"..."
, #привет
, #こんにちは
, #"3"