diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T14488.hs | 10 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 1 |
2 files changed, 11 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) diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index 417e43ee70..19a99db629 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -584,3 +584,4 @@ test('T7169', normal, compile, ['']) test('T14434', [], run_command, ['$MAKE -s --no-print-directory T14434']) test('MissingExportList01', normal, compile, ['']) test('MissingExportList02', normal, compile, ['']) +test('T14488', normal, compile, ['']) |