[Haskell-cafe] Irrefutable pattern love and new regex engine.
stefanor at cox.net
Tue Jan 22 17:33:24 EST 2008
On Tue, Jan 22, 2008 at 02:09:05PM -0800, Ryan Ingram wrote:
> > > On Tue, 2008-01-22 at 11:55 -0500, Michael Speer wrote:
> > > > rexn ns pps = let ( ~( xs , rps ) ,
> > > > ~( ~( nxs ) ,
> > > > ~( rxs , rrps ) ) ) = ( exn nxs pps ,
> > Not one of the lazy marks was required in the current version.
> Pattern bindings via let are always irrefutable; the ~s here are all redundant.
False; let's irrefutability only applies at the topmost level.
Prelude> let (a,b) = undefined in 2
Prelude> let (a,(b,c)) = (2,undefined) in a
*** Exception: Prelude.undefined
Prelude> let (a,~(b,c)) = (2,undefined) in a
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080122/27863564/attachment.bin
More information about the Haskell-Cafe