
16 Jun
2017
16 Jun
'17
9:58 a.m.
On Fri, Jun 16, 2017 at 2:21 AM,
wrote: If you write instead
data D a b c d = D { f1 :: a, f2 :: b, f3 :: c, f4 :: d }
then you can abbreviate patterns like this:
f (D{}) = ()
As a special case, you can use the no-fields record pattern Cons {} with *any* constructor, regardless of whether it was defined with record syntax or whether it has parameters.
Aha, I checked it, good.