Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
1

Haskell question

rino19ny
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)

2 years ago

Voters

Comments

TopNew
1
Coder100
Coder100

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

2 years ago
1
Coder100
Coder100

you need an entry point.

2 years ago
Load more