Message-
| From: haskell-cafe-boun...@haskell.org
[mailto:haskell-cafe-boun...@haskell.org] On
| Behalf Of Martijn van Steenbergen
| Sent: 14 October 2009 19:35
| To: Haskell Cafe
| Subject: [Haskell-cafe] Monotype error
|
| Dear café,
|
| {-# LANGUAGE Rank2Types #-}
| {-# LANGUAGE
See our previous discussion on this topic here:
http://www.nabble.com/Fwd:-Unification-for-rank-N-types-td23942179.html
Thanks,
Vladimir
On Wed, Oct 14, 2009 at 10:35 PM, Martijn van Steenbergen
mart...@van.steenbergen.nl wrote:
Dear café,
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE
Dear café,
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ImpredicativeTypes #-}
type Void = forall a. a
newtype Mono a = Mono { runMono :: [Void] }
beep :: Mono a - Mono a
beep (Mono vs) = Mono (map undefined vs)
Compiling this with GHC results in:
Monotype.hs:9:28:
Cannot match a
* Martijn van Steenbergen mart...@van.steenbergen.nl [2009-10-14
20:35:06+0200]
Dear café,
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ImpredicativeTypes #-}
type Void = forall a. a
newtype Mono a = Mono { runMono :: [Void] }
beep :: Mono a - Mono a
beep (Mono vs) = Mono (map undefined