How run "C:/path> ghc haskellfile.hs" ?

  • Thread starter Thread starter ssecorp
  • Start date Start date
S

ssecorp

What do I need to do to be able to run things like:
"C:/path> ghc haskellfile.hs" from the command prompt?

ghc is the Haskell compiler.

I often see this with pyhton pythonfile.py too etc.

normally that is on Linux or Unix though.

But I am supposed to be able to do the same on windows I think.

Do I have to add the path to ghc.exe to the general system path? I
have tried that but it isn't working.
 
ssecorp said:
What do I need to do to be able to run things like:
"C:/path> ghc haskellfile.hs" from the command prompt?

ghc is the Haskell compiler.

I often see this with pyhton pythonfile.py too etc.

normally that is on Linux or Unix though.

But I am supposed to be able to do the same on windows I think.

Do I have to add the path to ghc.exe to the general system path? I
have tried that but it isn't working.

Are you sure that you are using the Windows version of ghc? If you are, you
need to put it in a folder that is added to your path. I put extra programs
and command in a folder called C:\windows\~command. The ~ is there so it
appears at the top of the folder listing. It's easier to edit the path in
Environmental Variables in System Properties, as you get messed around by
carriage returns with using the PATH command. Pasting it into Notepad with
Text Wrap off is easiest. It's easier to add the .exe file to
C:\windows\system32 as it already in the path, but that is very messy I
think. Have you double checked that your path is correct?

ss.
 
Back
Top