
11 Jan
2019
11 Jan
'19
1:58 p.m.
On 11.01.19 19:13, Brandon Allbery wrote:
Only up to a point. Recursive uses — such as show, which delegates to other Show instances for record fields, etc. — are problematic.
Please explain. Do you mean that size (S (S Z)) and size_N (S (S Z)) are not equivalent for these declarations? class Size t where size :: t -> Int data N = Z | S N instance Size N where size Z = 0 ; size (S n) = succ (size n) size_N Z = 0 ; size_N (S n) = succ (size n) I was trying to read core for this but I'm not sure what's the best way to call ghc. Which of the -ddump-* options is best suited (-ddump-simpl ?) and what do I look for in the output? Thanks - J.W.