In this example the 8.8.4 version was selected and the ghc-8.8.4-x86_64-unknown-mingw32.tar.xz package was downloaded.
2. Unzip the contents of that package into this folder location.
Code: Select all
c:\ghc-8.8.4\
3. Add the following folder location to the PATH making sure to include the extra bin folder as shown:
Code: Select all
c:\ghc-8.8.4\bin\
4. Start the Zeus IDE and check the PATH has been correctly configure by using the Tools, DOS Command Line menu to run the following command:
Code: Select all
ghc -V
Code: Select all
The Glorious Glasgow Haskell Compilation System, version 8.8.4
5. Using the Options, Document Types menu edit the Haskell Document Type and in the Compiler section enter in the following compiler command:'ghc' is not recognized as an internal or external command, operable program or batch file.
Code: Select all
ghc.exe -o $fb "$fn"
Code: Select all
Menu Text: Execute '$fb.exe'
Macro Name: $zud\zScript\run_exec.lua
Arguments: $fdd$fb.exe
Code: Select all
main :: IO ()
main = putStrLn "Haskell - Hello World!"
This should result in the following output:
9. With the test.hs file as the active window, use the Macros, Execute 'test.exe' menu to run the executable file which should result in the following output:[1 of 1] Compiling Main ( C:\temp\hw.hs, C:\temp\hw.o )
Linking hw.exe ...
IMPORTANT NOTE:Haskell - Hello World!
When running the compile an error similar to the following might be produced:
This can happen when an older version of the GCC compiler is installed on the machine.In file included from C:/Utilities/Perl/c/i686-w64-mingw32/include/stddef.h:7:0,
from C:/Utilities/Perl/c/lib/gcc/i686-w64-mingw32/4.9.2/include/stddef.h:1,
from c:\Haskell\include/stdio.h:69,
from C:\Users\Jussi\AppData\Local\Temp\cob83248_0.c:8:
C:/Utilities/Perl/c/i686-w64-mingw32/include/crtdefs.h:123:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
__MINGW_EXTENSION typedef __int64 __time64_t;
^
C:/Utilities/Perl/c/i686-w64-mingw32/include/crtdefs.h:138:9: error: unknown type name '__time64_t'
Reading the error it is clear the Haskell compiler has picked up the stddef.h file from this location:
However it should have found the the Haskell installation version of that file found here:C:\Utilities\Perl\c\i686-w64-mingw32\include\stddef.h
Cheers JussiC:\ghc-8.8.4\mingw\lib\gcc\x86_64-w64-mingw32\7.2.0\include\stddef.h