# What are ZMZN and ->Z1T in a ghc space profile?

Julian Seward (Intl Vendor) v-julsew@microsoft.com
Fri, 16 Nov 2001 04:47:01 -0800

```I suspect you're both right.  I seem to remember that it used
to be the way Keith says, but was relatively recently changed to
be the way Robert says.

J

| > >=20
| > > ZMZM =3D []  - The list Nil constructor
| > > Z1T =3D ( )  - The 1-tuple constructor
| >=20
| > IIRC, the "1" is the number of commas, so Z1T is the *pair*=20
| > constructor.
|=20
| The comments in OccName.lhs say:=20
|=20
| 	[copying direct from the file]
|=20
| 	Before		After
| 	--------------------------
| 	Trak		Trak
| 	foo_wib		foozuwib
| 	>		zg
| 	>1		zg1
| 	foo#		foozh
| 	foo##		foozhzh
| 	foo##1		foozhzh1
| 	fooZ		fooZZ=09
| 	:+		ZCzp
| 	()		Z0T	0-tuple
| 	(,,,,)		Z5T	5-tuple =20
| 	(# #)           Z1H     unboxed 1-tuple	(note the space)
| 	(#,,,,#)	Z5H	unboxed 5-tuple
| 		(NB: There is no Z1T nor Z0H.)
|=20
| Which, interestingly, says that there is no Z1T, despite=20
| sengan having=20
| supposedly found one.
|=20
| However it also suggests that, if Z1T did exist, then it=20
| would be a 1-tuple.
|=20
|=20
| The code itself backs this up and suggests that the number is=20
| the number of=20
| commas + 1:
|=20
| maybe_tuple "()" =3D Just("Z0T")
| maybe_tuple ('(' : cs)       =3D case count_commas (0::Int) cs of
| 				 (n, ')' : cs) -> Just ('Z' :=20
| shows (n+1) "T")
| 				 other	       -> Nothing
| maybe_tuple other    	     =3D Nothing
|=20
|=20
| Just in case anyone wasn't confused yet :-)
|=20
|=20
|=20
| -Rob
|=20
|=20
| _______________________________________________