Concrete syntax for pattern synonym type signatures

Dr. ERDI Gergo gergo at erdi.hu
Mon Nov 10 14:09:23 UTC 2014


Good news, I've made the necessary parser breakthrough and I've now got

     pattern P :: pretty much anything after this point

to parse as a pattern synonym type signature on a local sub-branch of my 
branch. So no more annoying 'pattern type' nonsense.

As for the 'pretty much anything' part, I have SPJ's original proposal 
implemented as a proof-of-concept:

     pattern C :: forall b c. (; Eq b, Num b) => b -> c -> X Maybe (Maybe b)

But I see that the popular opinion now seems to be moving to

     pattern C :: () => (Eq b, Num b) => b -> c -> X Maybe (Maybe b)

which should be even easier to implement now, so I hope to finish the 
branch in a couple days (it probably doesn't need more than an evening's 
work now).

Thanks go out to everyone who contributed in this little syntax 
bikeshedding exercise.

Bye,
 	Gergo


-- 

   .--= ULLA! =-----------------.
    \     http://gergo.erdi.hu   \
     `---= gergo at erdi.hu =-------'
Define (n.)  De ting you get for breaking de law.


More information about the ghc-devs mailing list