
I want to read some data from a file "Signature.ken" , for that I have written a program but its showing some errors (the file "signature.ken" contains data of the type = (122,152) ) main = do j <- readFile "sig1.key" let (x,y) = (read j) putStrLn ("value=" ++ (show (x,y))) ERROR file:.\-as.hs:5 - Unresolved top-level overloading *** Binding : main *** Outstanding context : (Read c, Read b, Show c, Show b)

Ashutosh,
ERROR file:.\-as.hs:5 - Unresolved top-level overloading *** Binding : main *** Outstanding context : (Read c, Read b, Show c, Show b)
Add an type annotation: main = do j <- readFile "sig1.key" let (x,y) = (read j) :: (Int, Int) -- <----- putStrLn ("value=" ++ (show (x,y))) Cheers, Stefan
participants (2)
-
ashutosh dimri
-
Stefan Holdermans