> Why not just have a Main.hs file?
> As for that error message, do you have a main function? Are you sure
> you were using --make?
thank you for taking the time for reply. A friend finally found the issue. The main function in the Main module was ok, the problem was in the cabal file. I did not know it could be specified whether you want to get a library or an executable (before there was only the library specified). Now both are mentionned in the cabal file (the executable depends on the library) and
everything is fine.
Here is an extract of the cabal file in case someone else has the same problem :
library
ghc-options: -Wall
build-depends: base > 4 && < 5
...
extensions:
exposed-modules: Language.Copilot
Language.Copilot.Core
... -- Not Main here !
executable copilot
executable: copilot
hs-source-dirs: .
Language/Copilot
other-modules: Core
... -- Nor here !
main-is: Main.hs
Thank you again, and sorry for bothering you with that issue which was finally only a cabal configuration mistake and not a real haskell issue.
Robin