
1 Oct
2004
1 Oct
'04
2:36 a.m.
"Georg Martius"
Last night as I have tried to improve Gregs wc in a simple fashion and came up with the same idea to make a new data type with strict fields. I thought why one couldn't add some kind of strictness annotation to the function type. First attempt:
wc :: !(Int,Int,Int) -> Char -> (Int, Int, Int)
I'm not sure if that was your question, but I think this will just ensure that the first argument is really a tuple (and not bottom), it doesn't evaluate the Ints inside the tuple strictly. Try something like wc :: !Int -> !Int -> !Int -> Char -> (Int,Int,Int) -kzm -- If I haven't seen further, it is by standing in the footprints of giants