
11 Aug
2011
11 Aug
'11
7:07 a.m.
On Thursday 11 August 2011, 12:53:16, Sunil S Nandihalli wrote:
Hello everybody, When I compile a file containing ... I get the following error..
main.hs:34:107: Couldn't match expected type `Bool' with actual type `Maybe t0' In the pattern: Just v In a case alternative: (Just v) -> ("." ++ (show v) ++ ".") In the second argument of `(++)', namely `(case (M.member (newRowId, newColId) locsmap) of {
`member' tests whether a key is in the map, it returns a Bool ("is it a member", not "give me the member if there is one"). It looks like you want M.lookup here.
(Just v) -> ("." ++ (show v) ++ ".") (Nothing) -> " " })'
can somebody help?
Thanks, Sunil.