Hi Alistair,

| I've just debugged a program that used a case expression, but 
| where I was trying to match on constants rather than literals.
| Here's a contrived example:
| 
| > module Main where
| > one = 1
| > two = 2
| >
| > test n =
| >     case n of
| >             one -> "one"
| >             two -> "two"
| >             _ -> "three"
| >
| > main = putStrLn (test 2)

There's a 1992 tech report by Aitken and Reppy that provides a proposal
for doing this kind of thing (and a bit more) in the context of SML:

 ftp://ftp.research.bell-labs.com/dist/smlnj/papers/92-tr-aitken.ps

All the best,
Mark

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to