September 2017
Beginner to intermediate
396 pages
9h 46m
English
In the command prompt, run stack ghci. You will see the prompt. Enter this =:type (5 :: Int) =: command:
*Main Lib> :type (5 :: Int) (5 :: Int) :: Int
:type is a GHCi command to show the type of the expression. In this case, the expression is 5. It means that the expression (5 :: Int) is Int. Now, enter this :type 5 command:
*Main Lib> :type 5 5 :: Num t => t
Read now
Unlock full access