diff options
Diffstat (limited to 'testsuite/tests/indexed-types/should_compile/Simple14.hs')
-rw-r--r-- | testsuite/tests/indexed-types/should_compile/Simple14.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/Simple14.hs b/testsuite/tests/indexed-types/should_compile/Simple14.hs index 0a47a649a5..dba26194f1 100644 --- a/testsuite/tests/indexed-types/should_compile/Simple14.hs +++ b/testsuite/tests/indexed-types/should_compile/Simple14.hs @@ -5,21 +5,23 @@ module Simple14 where data EQ_ x y = EQ_ -- Nov 2014: actually eqE has an ambiguous type +-- Apr 2020: now it doesn't again eqE :: EQ_ x y -> (x~y => EQ_ z z) -> p -eqE = error "eqE" +eqE x y = error "eqE" eqI :: EQ_ x x eqI = error "eqI" ntI :: (forall p. EQ_ x y -> p) -> EQ_ x y -ntI = error "ntI" +ntI x = error "ntI" foo :: forall m n. EQ_ (Maybe m) (Maybe n) -foo = ntI (`eqE` (eqI :: EQ_ m n)) +foo = ntI (\x -> x `eqE` (eqI :: EQ_ m n)) + -- Alternative -- foo = ntI (\eq -> eq `eqE` (eqI :: EQ_ m n)) -- eq :: EQ_ (Maybe m) (Maybe n) -- Need (Maybe m ~ Maybe n) => EQ_ m n ~ EQ_ zeta zeta -- which reduces to (m~n) => m ~ zeta --- but then we are stuck
\ No newline at end of file +-- but then we are stuck |