I am getting a Couldn't match expected type error on this code and am not sure why. Would appreciate it if someone could point me in the right direction as to fixing it.
import qualified Data.ByteString.Lazy as S
import Data.Binary.Get
import Data.Word
getBinary :: Get Word16
getBinary = do
a <- getWord16be "Test.class"
return (a)
main :: IO ()
main = do
contents <- S.getContents
print getBinary contents
Specifically it cannot match expected type 'S.ByteString -> IO ()' to inferred type 'IO ()'