diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/TyAppPat_ExistentialMulti.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/TyAppPat_ExistentialMulti.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/TyAppPat_ExistentialMulti.hs b/testsuite/tests/typecheck/should_compile/TyAppPat_ExistentialMulti.hs new file mode 100644 index 0000000000..7e207c312a --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/TyAppPat_ExistentialMulti.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE ExistentialQuantification #-} + +module Main where + +data Foo where + MkFoo :: forall a b. a -> (a -> String) -> b -> (b -> String) -> Foo + +foo :: Foo -> String +foo (MkFoo @u @v x f y g) = f (x :: u) ++ g (y :: v) + +main = do + print (foo (MkFoo "hello" reverse True show)) |