summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/HardRecordUpdate.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/HardRecordUpdate.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/HardRecordUpdate.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/HardRecordUpdate.hs b/testsuite/tests/typecheck/should_compile/HardRecordUpdate.hs
new file mode 100644
index 0000000000..fc32f79bb3
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/HardRecordUpdate.hs
@@ -0,0 +1,16 @@
+{-# LANGUAGE GADTs, TypeFamilies #-}
+
+module HardRecordUpdate where
+
+import Data.Kind
+
+type F :: Type -> Type
+type family F a where {}
+
+type G :: Type -> Type -> Type -> Type
+data family G a b c
+data instance G a b Char where
+ MkG :: { bar :: F a } -> G a Bool Char
+
+g :: F Int -> G Float b Char -> G Int b Char
+g i r = r { bar = i }