[Haskell-cafe] Haskell Quiry

Stefan Holdermans stefan at cs.uu.nl
Fri Jun 1 01:57:19 EDT 2007


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



More information about the Haskell-Cafe mailing list