summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_run/RecordDotSyntax3.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/parser/should_run/RecordDotSyntax3.hs')
-rw-r--r--testsuite/tests/parser/should_run/RecordDotSyntax3.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_run/RecordDotSyntax3.hs b/testsuite/tests/parser/should_run/RecordDotSyntax3.hs
new file mode 100644
index 0000000000..1ee7565573
--- /dev/null
+++ b/testsuite/tests/parser/should_run/RecordDotSyntax3.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE OverloadedRecordDot #-}
+
+module Main where
+
+import qualified RecordDotSyntaxA as A
+
+
+main = do
+ print $ id A.n -- Foo {foo = 2}; f M.x means f (M.x)
+ print $ id A.n.foo -- 2; f M.n.x means f (M.n.x)
+
+ let bar = A.Foo {A.foo = 1}
+ print $ bar.foo -- Ok; 1
+ -- print $ bar.A.foo -- parse error on input 'A.foo'