Skip to content
Sign upLog in
← Back to Community

Haskell question

Profile icon
rino19ny

i have this in my "main.hs":

doubleMe x = x + x;
doubleUs x y = doubleMe x + doubleMe y

when i click on "Run" button, it gives this error:

GHCi, version 8.6.5

:3:1: error:
* Variable not in scope: main
* Perhaps you meant `min' (imported from Prelude)

Voters
Profile icon
rino19ny
Comments
hotnewtop
Profile icon
Coder100

haskell doesn't just execute random functions, you need to actually specify a main function, which haskell will execute

Profile icon
Coder100

you need an entry point.