summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T14488.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T14488.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/T14488.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T14488.hs b/testsuite/tests/typecheck/should_compile/T14488.hs
new file mode 100644
index 0000000000..a4a12841b7
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T14488.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE RankNTypes #-}
+
+module T14488 where
+
+type Lens' s a = forall f. Functor f => (a -> f a) -> s -> f s
+
+data T a = MkT { _tfield :: Eq a => a }
+
+tfield :: Eq a => Lens' (T a) a
+tfield f t = MkT <$> f (_tfield t)