What are ZMZN and ->Z1T in a ghc space profile?
I searched on google, but had no luck. My program is an implementation of http://www-aig.jpl.nasa.gov/public/home/gat/lisp-study.html in haskell, and the dictionary read in is rather large (900Kb) so I assume most of the space should be [[Char]] Sengan
I searched on google, but had no luck. My program is an implementation of http://www-aig.jpl.nasa.gov/public/home/gat/lisp-study.html in haskell, and the dictionary read in is rather large (900Kb) so I assume most of the space should be [[Char]]
Zxxx is the way GHC encodes operator names into something friendly to C. For a description of the translation, it is probably easiest to look at the relevent GHC source code, available online as: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/ghc/compiler/basicTypes/Oc... This URL will probably get broken up by my mailer. The file is basicTypes/OccName.lhs But, to answer your emmediate question: ZMZM = [] - The list Nil constructor Z1T = ( ) - The 1-tuple constructor -Rob
But, to answer your emmediate question:
ZMZM = [] - The list Nil constructor Z1T = ( ) - The 1-tuple constructor
IIRC, the "1" is the number of commas, so Z1T is the *pair* constructor. --KW 8-) -- Keith Wansbrough <kw217@cl.cam.ac.uk> http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory.
But, to answer your emmediate question:
ZMZM = [] - The list Nil constructor Z1T = ( ) - The 1-tuple constructor
IIRC, the "1" is the number of commas, so Z1T is the *pair* constructor.
The comments in OccName.lhs say: [copying direct from the file] Before After -------------------------- Trak Trak foo_wib foozuwib > zg >1 zg1 foo# foozh foo## foozhzh foo##1 foozhzh1 fooZ fooZZ :+ ZCzp () Z0T 0-tuple (,,,,) Z5T 5-tuple (# #) Z1H unboxed 1-tuple (note the space) (#,,,,#) Z5H unboxed 5-tuple (NB: There is no Z1T nor Z0H.) Which, interestingly, says that there is no Z1T, despite sengan having supposedly found one. However it also suggests that, if Z1T did exist, then it would be a 1-tuple. The code itself backs this up and suggests that the number is the number of commas + 1: maybe_tuple "()" = Just("Z0T") maybe_tuple ('(' : cs) = case count_commas (0::Int) cs of (n, ')' : cs) -> Just ('Z' : shows (n+1) "T") other -> Nothing maybe_tuple other = Nothing Just in case anyone wasn't confused yet :-) -Rob
participants (3)
-
Keith Wansbrough -
Robert Ennals -
senganb@ia.nsc.com