Excellent bikeshedding opportunity! Frontend syntax for pattern synonym types

Dr. ERDI Gergo gergo at erdi.hu
Sun Dec 22 16:44:29 UTC 2013


On Sun, 22 Dec 2013, Jacques Carette wrote:

> pattern P :: (Show t) => ( (Num t, Eq b) => b -> T t )
> perhaps?  Given 'Show t', you get what's on the rhs of the first => ?

I like this one; in fact, I originally wanted to go with something like 
that. But unfortunately, this type is already valid and is 
parsed simply as (Show t, Num t, Eq b) => b -> T t by GHC:

Prelude> :t undefined :: (Show t) => ((Num t, Eq b) => b -> Maybe t)
undefined :: (Show t) => ((Num t, Eq b) => b -> Maybe t)
   :: (Eq b, Num t, Show t) => b -> Maybe t

--

   .--= ULLA! =-----------------.
    \     http://gergo.erdi.hu   \
     `---= gergo at erdi.hu =-------'
A pessimist sees the glass half empty, the optimist sees it half full and the blind can't see shit


More information about the Glasgow-haskell-users mailing list