summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T14488.hs
blob: 04c295b7061df399d31c682894ee07671d34ed00 (plain)
1
2
3
4
5
6
7
8
9
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 = (\x -> MkT x) <$> f (_tfield t)