summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@richarde.dev>2020-11-09 14:04:32 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-11-10 10:28:10 -0500
commitfa344d33dba71f31f55269c5fc733daa3830073a (patch)
tree0092e1a0d887face9fcfecfd1a32093bead22077 /testsuite
parent7814cd5bb0d145c4d83d7566885bdc3992b63d0c (diff)
downloadhaskell-fa344d33dba71f31f55269c5fc733daa3830073a.tar.gz
Add test case for #17186.
This got fixed sometime recently; not worth it trying to figure out which commit.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typecheck/should_compile/T17186.hs17
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T2
2 files changed, 18 insertions, 1 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T17186.hs b/testsuite/tests/typecheck/should_compile/T17186.hs
new file mode 100644
index 0000000000..c060f0b6f7
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T17186.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE TypeFamilyDependencies #-}
+{-# LANGUAGE TypeOperators, AllowAmbiguousTypes #-}
+
+module T17186 where
+
+-- This test is significantly abbreviated from what was posted; see
+-- #16512 for more context.
+
+type family Dim v
+
+type family v `OfDim` (n :: Dim v) = r | r -> n
+
+(!*^) :: Dim m `OfDim` j -> Dim m `OfDim` i
+(!*^) = undefined
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index d02c3ee2fa..263ff97ba1 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -728,4 +728,4 @@ test('T18831', normal, compile, [''])
test('T18920', normal, compile, [''])
test('T15942', normal, compile, [''])
test('ClassDefaultInHsBoot', [extra_files(['ClassDefaultInHsBootA1.hs','ClassDefaultInHsBootA2.hs','ClassDefaultInHsBootA2.hs-boot','ClassDefaultInHsBootA3.hs'])], multimod_compile, ['ClassDefaultInHsBoot', '-v0'])
-
+test('T17186', normal, compile, [''])