On Fri, 2011-05-20 at 19:04 -0700, michael rice wrote: > markov4.hs:35:27: Couldn't match expected type `Map k a' > against inferred type `(Map Prefix [String], Prefix, [String])'
ghc seems to believe `mp' here is not just a map, but the entire state (which is what execState is meant to give you). > type GeneratorState = State ((Map Prefix [String]),Prefix,[String]) The state is a triple, so you need to match to get the real map out: > let (themap,_,_) = mp > putStrLn $ show $ themap ! (non_word,non_word)
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
