[Haskell-cafe] OCaml list sees abysmal Language Shootout results

Ketil Malde ketil+haskell at ii.uib.no
Fri Oct 1 02:36:24 EDT 2004


"Georg Martius" <mai99dgf at studserv.uni-leipzig.de> writes:

> 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


More information about the Haskell-Cafe mailing list