I train from LYAH.
The phoneBook.hs file contains the following code:
phoneBook :: [(String, String)]
When I try to compile the above code, I get the following error:
* Home>: download "/home/optimight/phoneBook.hs" [1 of 1] Compiling Main (/home/optimight/phoneBook.hs, interpreted)
/home/optimight/phoneBook.hs:1:1: Typical signature for "phoneBook" has no accompanying binding. Failure, modules loaded: no.
The question is added after the brano answer and the subsequent comment on this answer: How do we provide an implementation for the above type signature?
If I add this:
type phoneBook = [(String, String)]
I get the following error:
> : "/home/optimight/phoneBook.hs" [1 1] Main (/home/optimight/phoneBook.hs, )
/home/optimight/phoneBook.hs:2:6: : phoneBook , : none