Question about ghc case analysis

9 Aug
2005
9 Aug
'05
11:24 a.m.
Hello, Well this is actually a couple of questions.. First question is how does ghc do case analysis on algebraic data type constructors. I always assumed it was by using some kind of jump table on a tag field, but I don't know really (I'm not even sure ghc makes use of tag fields as such). Second question is really the same question but for literals. What search algorithm is employed and is it likely to be worth hand coding something else? (a binary search maybe). I'm thinking of code like this.. case n of 0 -> 7 -> 34622 -> .. lots more _ -> Thanks -- Adrian Hey
7283
Age (days ago)
7283
Last active (days ago)
0 comments
1 participants
participants (1)
-
Adrian Hey