I compiled my helloworld.hs and got the helloworld.o file, I tried. / helloworld, but that didn’t work, so is this the right way to execute helloworld? I use cygwin, I just write $ ghc --make helloworld.hs , and I get helloworld.hi, helloworld.exe.manifest, helloworld.o files, I don’t know what to do, do the following ...
As you did not specify anything about how you compiled, for example, which particular compiler you use, we can only guess. The usual way to get the .o (object) file from ghc is to use the -c switch; as stated in the manual, this means "do not mess." Mnemonics "compiles only." Without linking, you only have part of the program, and it cannot be executed. Exactly what needs to be associated with it will depend on the particular object file, and some of them will be populated by default if you just let the compiler run the linker. Binding separately is more complicated.
, Cygwin ghc ghc Windows, a.out ( ), helloworld.exe. a.out, .exe, Windows.
a.out
helloworld.exe
.exe
ghc, : ghc -o helloworld.exe --make helloworld.hs.
ghc -o helloworld.exe --make helloworld.hs
, ghc --help :
ghc --help
Haskell, :ghc-6.8.2 --make MainMain Main.hs( Main.lhs) . , a.out' (or Main.exe ' Windows).
ghc-6.8.2 --make Main
a.out' (or
Source: https://habr.com/ru/post/1756236/More articles:Javascript object properties are displayed in the console, but undefined? - javascriptImport mutable Python behavior - pythonCannot be allowed or is not a field (exercises for notepad from android dev site) - androidHow to hide text using CSS? - htmlAgility sudoku solver: rollback? - cClass Hierarchy - c ++Why do you need to include parent DLLs in asp.net child projects? - asp.netHow to launch a VB6 project in Hudson? - windows-xpCan another application access the private key stored in the key container using RSACryptoServiceProvider? - cryptographyHow can I get SCP and ftp (from the command line, not the plugin) working in hudson - scpAll Articles