works for me

1
2
3
4
5
6
7
8
type Register = Int

main = do
    let p = readRegister "12 32 11"
    return ()

readRegister :: String -> Register
readRegister s = read s :: Register