I created a data type to hold basic user information and loaded it into ghci. I then used ghci to look at the new data types type signature. I copied the type signature from ghci into the source file and tried to reload the file. Ghci threw an error.
The code and error are below.
My question is, why is this throwing an error. I used the type that was inferred by ghci.
User :: Int -> String -> String -> String -> String -> User
data User = User { userID :: Int,
login :: String,
password :: String,
username :: String,
email :: String
} deriving (Show)
Prelude> :r User [1 of 1] Compiling User ( User.hs, interpreted )
User.hs:3:0: Invalid type signature Failed, modules loaded: none.
Note: SO seems to have trouble parsing the image url I added, so here is the direct link (it's a screenshot of the error).