I'm trying to get the values from this function, so, when i call that function "prompt" a send a message and this function return an value according with the supposed question that i made.
But i can't receive that value, so why ? I'm noob with haskell.
module Main (main) where
import System.IO (stdout, hSetBuffering, BufferMode(NoBuffering))
type State = Double
main::IO()
prompt::Read a => String -> IO a
main = do putStrLn "Testing"
v <- prompt "Whats your name?"
return ()
prompt str = do putStrLn str
valor <- readLn
return valor
vto be of typeString, but the compiler has no way of knowing that.