summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/T13394a.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-03-10 11:12:12 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2017-03-10 13:00:48 +0000
commitbc0f3abd0914808e33f84229818ab90842611bdd (patch)
tree99c64e30c11664a6de45446c183751958eef70a7 /testsuite/tests/polykinds/T13394a.hs
parent900cfdc2700ad9e8c7a12dd25bb0396e5e7651df (diff)
downloadhaskell-bc0f3abd0914808e33f84229818ab90842611bdd.tar.gz
Deal with JoinIds before void types
Trac #13394, comment:4 showed up another place where we were testing for the representation of of a type; and it turned out to be a JoinId which can be rep-polymorphic. Just putting the test in the right places solves this easily.
Diffstat (limited to 'testsuite/tests/polykinds/T13394a.hs')
-rw-r--r--testsuite/tests/polykinds/T13394a.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T13394a.hs b/testsuite/tests/polykinds/T13394a.hs
new file mode 100644
index 0000000000..e79bf79d5b
--- /dev/null
+++ b/testsuite/tests/polykinds/T13394a.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE PatternSynonyms #-}
+module T13394 where
+
+import Data.ByteString
+
+newtype ProperName =
+ ProperName { runProperName :: ByteString
+ -- purescript actually uses the Text type, but this works
+ -- just as well for the purposes of illustrating the bug
+ }
+newtype ModuleName = ModuleName [ProperName]
+
+pattern TypeDataSymbol :: ModuleName
+pattern TypeDataSymbol = ModuleName [ProperName "Type", ProperName "Data"]