diff options
author | simonmar <unknown> | 2001-08-08 14:28:08 +0000 |
---|---|---|
committer | simonmar <unknown> | 2001-08-08 14:28:08 +0000 |
commit | a7f5d12382a35ca9ba27f5bd012308983c2d156e (patch) | |
tree | 69cde5458a313c5ed1d2bc0510b1d1b5cb031677 /ghc/tests | |
parent | 598b2974f90c68a658509c3cd04c08470d88b7e6 (diff) | |
download | haskell-a7f5d12382a35ca9ba27f5bd012308983c2d156e.tar.gz |
[project @ 2001-08-08 14:28:08 by simonmar]
Fix parse error and remove ^Ms (an untested test?)
Diffstat (limited to 'ghc/tests')
-rw-r--r-- | ghc/tests/typecheck/should_compile/tc124.hs | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/ghc/tests/typecheck/should_compile/tc124.hs b/ghc/tests/typecheck/should_compile/tc124.hs index 5a87eb2666..6a1b9de8f8 100644 --- a/ghc/tests/typecheck/should_compile/tc124.hs +++ b/ghc/tests/typecheck/should_compile/tc124.hs @@ -1,18 +1,18 @@ -{-# OPTIONS -fglasgow-exts #-}
-
---!!! Rank 2 polymorphism
--- Both f and g are rejected by Hugs [April 2001]
-
-module Foo where
-
-data T = T { t1 :: forall a. a -> a , t2 :: forall a b. a->b->b }
-
--- Test pattern bindings for polymorphic fields
-f :: T -> (Int,Char)
-f t = let T { t1 = my_t1 } = t
- in
- (my_t1 3, my_t1 'c')
-
--- Test record update with polymorphic fields
-g :: T -> T
-g t = t { t2 = \x y -> y }
+{-# OPTIONS -fglasgow-exts #-} + +-- !!! Rank 2 polymorphism +-- Both f and g are rejected by Hugs [April 2001] + +module Foo where + +data T = T { t1 :: forall a. a -> a , t2 :: forall a b. a->b->b } + +-- Test pattern bindings for polymorphic fields +f :: T -> (Int,Char) +f t = let T { t1 = my_t1 } = t + in + (my_t1 3, my_t1 'c') + +-- Test record update with polymorphic fields +g :: T -> T +g t = t { t2 = \x y -> y } |