On Fri, Jun 16, 2017 at 2:21 AM, <ok@cs.otago.ac.nz> 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.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net