[Git][ghc/ghc][master] Add tests for #17873

Marge Bot gitlab at gitlab.haskell.org
Thu Apr 30 05:58:24 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
5bdfdd13 by Simon Peyton Jones at 2020-04-30T01:58:15-04:00
Add tests for #17873

- - - - -


2 changed files:

- + testsuite/tests/typecheck/should_compile/T17873.hs
- testsuite/tests/typecheck/should_compile/all.T


Changes:

=====================================
testsuite/tests/typecheck/should_compile/T17873.hs
=====================================
@@ -0,0 +1,15 @@
+{-# LANGUAGE ImplicitParams #-}
+
+module T17873 where
+
+-- With GHC 8.8 this failed with a nonsense message
+--    Couldn't match type ‘?x::Bool -> Bool’ with ‘Bool’
+--      Expected type: Bool -> Bool -> Bool
+--      Actual type: (?x::Bool -> Bool) => Bool -> Bool
+
+-- With eager instantiation, it's fine.
+
+getx :: (?x :: Bool -> Bool) => Bool -> Bool
+getx = ?x
+
+z3 = (let ?x = not in getx) False


=====================================
testsuite/tests/typecheck/should_compile/all.T
=====================================
@@ -705,3 +705,4 @@ test('T18005', normal, compile, [''])
 test('T18023', normal, compile, [''])
 test('T18036', normal, compile, [''])
 test('T18036a', normal, compile, [''])
+test('T17873', normal, compile, [''])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5bdfdd139e5aff57631e9f1c6654dc7b8590c63f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5bdfdd139e5aff57631e9f1c6654dc7b8590c63f
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/20200430/5f75b79d/attachment.html>


More information about the ghc-commits mailing list