summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_compile/faxen.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/ghc-regress/typecheck/should_compile/faxen.hs')
-rw-r--r--testsuite/tests/ghc-regress/typecheck/should_compile/faxen.hs30
1 files changed, 0 insertions, 30 deletions
diff --git a/testsuite/tests/ghc-regress/typecheck/should_compile/faxen.hs b/testsuite/tests/ghc-regress/typecheck/should_compile/faxen.hs
deleted file mode 100644
index c7310529c6..0000000000
--- a/testsuite/tests/ghc-regress/typecheck/should_compile/faxen.hs
+++ /dev/null
@@ -1,30 +0,0 @@
-{-# LANGUAGE Rank2Types #-}
-
--- A classic test for type inference
--- Taken from "Haskell and principal types", Section 3
--- by Faxen, in the Haskell Workshop 2003, pp88-97
-
-module ShouldCompile where
-
-class HasEmpty a where
- isEmpty :: a -> Bool
-
-instance HasEmpty [a] where
- isEmpty x = null x
-
-instance HasEmpty (Maybe a) where
- isEmpty Nothing = True
- isEmpty (Just x) = False
-
-test1 y
- = (null y)
- || (let f :: forall d. d -> Bool
- f x = isEmpty (y >> return x)
- in f y)
-
-test2 y
- = (let f :: forall d. d -> Bool
- f x = isEmpty (y >> return x)
- in f y)
- || (null y)
-