
20 Oct
2003
20 Oct
'03
11:01 a.m.
| | I suppose I'm being bitten by User's Guide 7.8.2: | | "If more than one rule matches a call, GHC will choose one arbitrarily | to apply." | | even if a bit later it says: | | "So a rule only matches if the types match too." | | Am I understanding right and it's that so? I think so. After all, the types match for count/generic too. Maybe you want a rule genericLength = length which will replace a call to (genericLength at type Int) by a call to length? You can also use "phases" to control order of rule application (albeit it's crude). http://www.haskell.org/ghc/docs/latest/html/users_guide/pragmas.html#PHA SE-CONTROL Simon