Lemmih wrote:

Change:

 > table :: [(String, Integer)] -> String -> Maybe Integer
 > table ls str = Map.lookup str fm
 >    where fm = trace "Trace: making the map" $ Map.fromList ls

to:

 > table :: [(String, Integer)] -> String -> Maybe Integer
 > table ls = \str -> Map.lookup str fm
 >    where fm = trace "Trace: making the map" $ Map.fromList ls
This did the trick, in both this toy example and in the more complicated real program. It turns out that the seq later on is not actually necessary.

Thanks,

Paul.
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to