I have defined a type as:
type Register = Int
I'm also able to read in a list of numbers from a list of Strings using a function like:
readInt :: String -> Int
readInt s = read s :: Int
now, using readInt on a list like readInt "12 32 11" gives me [12, 32, 11] which is of type [Int].
My question is: instead of [Int], how can I get [Register].
I tried:
readRegister :: String -> Register
readRegister s = read s :: Register
but as I guessed, it doesn't seem to be valid syntax.