I have a haskell file test.hs. In this file I have written a function
doubleMe x: x + x
this is the only function in this file test.hs. In the ghci command prompt I have typed ":l test.hs" without quotes. The following error comes up:
compiling main <test.hs interpreted>
test.hs:1:1 Parse error: naked expression at top level
Failed: modules loaded:none
What will be the cause of this error.
I have gone through Haskell Error - Naked Expression at Top Level
and
what is parse error: naked expression at top level?
It did not help.