[Git][ghc/ghc][master] Add test for old issue displaying unboxed tuples in error messages (#502)
Marge Bot
gitlab at gitlab.haskell.org
Wed May 29 14:38:35 UTC 2019
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
a5b14ad4 by Kevin Buhr at 2019-05-29T14:38:30Z
Add test for old issue displaying unboxed tuples in error messages (#502)
- - - - -
3 changed files:
- + testsuite/tests/typecheck/should_fail/T502.hs
- + testsuite/tests/typecheck/should_fail/T502.stderr
- testsuite/tests/typecheck/should_fail/all.T
Changes:
=====================================
testsuite/tests/typecheck/should_fail/T502.hs
=====================================
@@ -0,0 +1,10 @@
+{-# LANGUAGE MagicHash, UnboxedTuples #-}
+
+module T502 where
+
+-- As per #502, the following type error message should correctly
+-- display the unboxed tuple type.
+bar :: Int
+bar = snd foo
+ where foo :: (# Int, Int #)
+ foo = undefined
=====================================
testsuite/tests/typecheck/should_fail/T502.stderr
=====================================
@@ -0,0 +1,12 @@
+
+T502.hs:8:11: error:
+ • Couldn't match expected type ‘(a0, Int)’
+ with actual type ‘(# Int, Int #)’
+ • In the first argument of ‘snd’, namely ‘foo’
+ In the expression: snd foo
+ In an equation for ‘bar’:
+ bar
+ = snd foo
+ where
+ foo :: (# Int, Int #)
+ foo = undefined
=====================================
testsuite/tests/typecheck/should_fail/all.T
=====================================
@@ -515,3 +515,4 @@ test('T16204c', normal, compile_fail, [''])
test('T16394', normal, compile_fail, [''])
test('T16414', normal, compile_fail, [''])
test('T16627', normal, compile_fail, [''])
+test('T502', normal, compile_fail, [''])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/a5b14ad4764c5596331dd5a0abf0b0f6df6b0053
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/a5b14ad4764c5596331dd5a0abf0b0f6df6b0053
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190529/e8b4acd2/attachment-0001.html>
More information about the ghc-commits
mailing list