summaryrefslogtreecommitdiff
path: root/testsuite/tests/stranal/should_compile/T19180.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/stranal/should_compile/T19180.hs')
-rw-r--r--testsuite/tests/stranal/should_compile/T19180.hs20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/stranal/should_compile/T19180.hs b/testsuite/tests/stranal/should_compile/T19180.hs
new file mode 100644
index 0000000000..d0211ac4e3
--- /dev/null
+++ b/testsuite/tests/stranal/should_compile/T19180.hs
@@ -0,0 +1,20 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE PolyKinds #-}
+module T14270 (mkTrApp) where
+
+import Data.Kind (Type)
+
+data TypeRep a = TypeRep
+
+mkTrApp :: TypeRep a -> TypeRep a
+mkTrApp (x :: TypeRep x)
+ | Just _ <- isTYPE (typeRepKind x)
+ = undefined
+mkTrApp x = TypeRep
+
+typeRepKind :: TypeRep (a :: k) -> TypeRep k
+typeRepKind = if sum [0..100] == 10 then undefined else const TypeRep
+
+isTYPE :: TypeRep (a :: Type) -> Maybe a
+isTYPE _ = if sum [0..100] == 10 then Nothing else undefined
+{-# NOINLINE isTYPE #-}