[ghc-steering-committee] Discussion about "Type Application in Patterns" (#126)
Joachim Breitner
mail at joachim-breitner.de
Thu Aug 16 23:27:55 UTC 2018
Hi,
Am Donnerstag, den 16.08.2018, 23:22 +0000 schrieb Simon Peyton Jones:
> > pattern Ascii :: String
> > pattern Ascii <- (all isAscii -> True)
> >
> > and now
> >
> > foo (Ascii @ ('X':rest)) =
> >
> > is now longer as silly…
>
> That’s a good example. It's easy to work around:
>
> pattern And p q = p at q
>
> foo (Ascii `And` ('X' : rest)) = ..
nice. I included this in the proposal under “Costs and Drawbacks”, for
future reference.
Cheers,
Joachim
--
Joachim Breitner
mail at joachim-breitner.de
http://www.joachim-breitner.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20180816/d3100094/attachment.sig>
More information about the ghc-steering-committee
mailing list