You cannot have an expression at the top-level. Haskell program entry point is a main
function in Main
module. Also print fib 5
calls print
with two arguments, you need to do:
main = print $ fib 5
or
main = print (fib 5)
You cannot have an expression at the top-level. Haskell program entry point is a main
function in Main
module. Also print fib 5
calls print
with two arguments, you need to do:
main = print $ fib 5
or
main = print (fib 5)