summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/T15322a.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/indexed-types/should_compile/T15322a.hs')
-rw-r--r--testsuite/tests/indexed-types/should_compile/T15322a.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/T15322a.hs b/testsuite/tests/indexed-types/should_compile/T15322a.hs
new file mode 100644
index 0000000000..93d0830b26
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_compile/T15322a.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE ScopedTypeVariables, FlexibleContexts #-}
+{-# LANGUAGE TypeOperators #-}
+
+module T15322a where
+
+import Data.Proxy (Proxy (..))
+import Type.Reflection
+import GHC.TypeLits (KnownNat, type (+))
+
+f :: forall n . (KnownNat n) => Proxy n -> TypeRep (n+1)
+f _ = typeRep