|
higher-order typing errors: msg#00044lang.haskell.glasgow.bugs
I don't understand why GHC (I was using 5.04.2) should reject these two programs. ======== {-# OPTIONS -fglasgow-exts #-} swap1 :: (forall a. a -> a, forall a. a -> a -> a) -> (forall a. a -> a -> a, forall a. a -> a) swap1 (a, b) = (b, a) yields: Bug2.hs:3: parse error on input `,' ======== {-# OPTIONS -fglasgow-exts #-} swap2 :: ((forall a. a -> a), (forall a. a -> a -> a)) -> ((forall a. a -> a -> a), (forall a. a -> a)) swap2 (a, b) = (b, a) yields: Bug2.hs:3: Illegal polymorphic type: forall a. a -> a In the type: (forall a. a -> a, forall a. a -> a -> a) -> (forall a. a -> a -> a, forall a. a -> a) While checking the type signature for `swap2'
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | newtype deriving panic, Dean Herington |
|---|---|
| Next by Date: | [ ghc-Bugs-672813 ] bad type does bad things, SourceForge.net |
| Previous by Thread: | newtype deriving panic, Dean Herington |
| Next by Thread: | RE: higher-order typing errors, Simon Peyton-Jones |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |