[commit: ghc] ghc-8.2: Fix #13233 by checking for lev-poly primops (add8e7f)

git at git.haskell.org git at git.haskell.org
Wed May 3 13:27:14 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/add8e7f759e64ff3f9855073d67b1eb3c8f4d83b/ghc

>---------------------------------------------------------------

commit add8e7f759e64ff3f9855073d67b1eb3c8f4d83b
Author: Richard Eisenberg <rae at cs.brynmawr.edu>
Date:   Sun Apr 23 14:16:32 2017 -0400

    Fix #13233 by checking for lev-poly primops
    
    The implementation plan is all in Note [Detecting forced eta expansion]
    in DsExpr.
    
    (cherry picked from commit 16b0a07e5d0c72c1171359e546d9373442ec0564)


>---------------------------------------------------------------

add8e7f759e64ff3f9855073d67b1eb3c8f4d83b
 testsuite/tests/codeGen/should_fail/T13233.stderr | 24 +++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/testsuite/tests/codeGen/should_fail/T13233.stderr b/testsuite/tests/codeGen/should_fail/T13233.stderr
new file mode 100644
index 0000000..c1cbb97
--- /dev/null
+++ b/testsuite/tests/codeGen/should_fail/T13233.stderr
@@ -0,0 +1,24 @@
+
+T13233.hs:14:11: error:
+    Cannot use primitive with levity-polymorphic arguments:
+      GHC.Prim.(#,#) :: a -> a -> (# a, a #)
+    Levity-polymorphic arguments:
+      a :: TYPE rep
+      a :: TYPE rep
+
+T13233.hs:22:16: error:
+    Cannot use primitive with levity-polymorphic arguments:
+      GHC.Prim.(#,#) :: forall (a :: TYPE rep1) (b :: TYPE rep2).
+                        a -> b -> (# a, b #)
+    Levity-polymorphic arguments:
+      a :: TYPE rep1
+      b :: TYPE rep2
+
+T13233.hs:27:10: error:
+    Cannot use primitive with levity-polymorphic arguments:
+      mkWeak# :: a
+                 -> b
+                 -> (State# RealWorld -> (# State# RealWorld, c #))
+                 -> State# RealWorld
+                 -> (# State# RealWorld, Weak# b #)
+    Levity-polymorphic arguments: a :: TYPE rep



More information about the ghc-commits mailing list