diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T4284.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T4284.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T4284.hs b/testsuite/tests/typecheck/should_compile/T4284.hs new file mode 100644 index 0000000000..2d5164a487 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T4284.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE RankNTypes #-} +module Test where + +foo :: () -> forall b. b +foo = undefined + +works = id foo + +fails = (id) foo + +-- works type checks, but fails fails with the following error +-- message: +-- +-- Cannot match a monotype with `() -> forall b. b' +-- Probable cause: `foo' is applied to too few arguments +-- In the first argument of `(id)', namely `foo' +-- In the expression: (id) foo |