I created a data type for storing basic user data and loaded it into ghci. Then I used ghci to search for a new signature like data type. I copied the type signature from ghci to the source file and tried to reload the file. Ghci made a mistake.
Below is the code and error.
My question is: why does this throw an error. I used the type that ghci inferred.
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] Compilation User (User.hs, interpreted)
User.hs: 3: 0: Invalid type signature Failure, modules loaded: none.
source share