summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T11232.hs
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2015-12-17 12:18:47 +0100
committerBen Gamari <ben@smart-cactus.org>2015-12-17 12:54:33 +0100
commitcab131624ad0cdd54e2f3a70f93c1bd574ccf102 (patch)
treec0058089855525ff94e5b1a1f41e78166ecb5b16 /testsuite/tests/simplCore/should_compile/T11232.hs
parent4f870f8481b2611619adf66d61eff06f02e3741f (diff)
downloadhaskell-cab131624ad0cdd54e2f3a70f93c1bd574ccf102.tar.gz
Fix #11232.
I somehow forgot to propagate roles into UnivCos. Very simple fix, happily. Test Plan: simplCore/should_compile/T11232 Reviewers: bgamari, austin, simonpj Reviewed By: simonpj Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1645 GHC Trac Issues: #11232
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/T11232.hs')
-rw-r--r--testsuite/tests/simplCore/should_compile/T11232.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T11232.hs b/testsuite/tests/simplCore/should_compile/T11232.hs
new file mode 100644
index 0000000000..5b98d3988c
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T11232.hs
@@ -0,0 +1,15 @@
+module T11232 where
+
+import Control.Monad
+import Data.Data
+
+mkMp :: ( MonadPlus m
+ , Typeable a
+ , Typeable b
+ )
+ => (b -> m b)
+ -> a
+ -> m a
+mkMp ext = unM (maybe (M (const mzero)) id (gcast (M ext)))
+
+newtype M m x = M { unM :: x -> m x }