I need a way to run Haskell code without any installation on Mac

I like to develop in Haskell, but now I am facing a problem. At my place of study, I do not have administrative rights in my account. I want to debug / test there. I need a way to run Haskell code without installing haskell-platform or ghci or anything else requiring an administrative privilege level. For example, a website on which haskell code will be executed (limited if you do not include access to files in it) or a java utility (or standalone .app , although java is preferred due to the nature of "parental control") or something I didn’t think yet. Source or compiled Java, Flash, and source code in Ruby or Python are preferable to native code. This applies to Mac OS X 10.6 for reference.

+4
source share
8 answers

You just need to install homebrew, which you can do without root privileges if you do this in your home directory. You can then brew install cabal-install which will automatically install cabal and ghc or brew install stack to install the stack.

+1
source

You can install GHC without administrator privileges, but you will have to build from the source. See Building on MacOS X for details.

In fact, like any other open source project, you can compile the code and install it, as a rule, anywhere in your file system, for example, in a folder in your home folder (I often use the ~ / .local folder for this goals).

As the linked page is mentioned, you can also use MacPorts and install it in any place where you can write. After installing MacPorts, you can install GHC.

EDIT

As pointed out by Karl in the comments below, you do not need to build from the source. Just take the binary archive from http://www.haskell.org/ghc/download_ghc_7_4_1#binaries .

+8
source

In addition to all other ideas, several companies will rent you virtual (cloud) linux servers for a few cents per hour. You have rights to them, and you can install whatever you want, and then freeze the image until you need it.

Usually this may not be beneficial for a local solution if you can do one job, but the possible additional benefit will be that your work can remain on one "computer", which you can access while sitting in front of any variety of modern PCs that may be available to you on a specific day.

+3
source

An alternative not only to Haskell is http://ideone.com/

+3
source

If you really can’t install anything, then

http://tryhaskell.org/ - like GHCi, but you cannot load modules, which means not only that you cannot use many standard functions (for example, functions in Data.List), but also that you You cannot use certain language functions (for example, user-defined types of algebraic data).

I also remember the hpaste style site that runs my code and allows you to have private pastes, but I can't remember it at the moment. Edit: I was thinking about http://codepad.org/ - thanks @Mog

+2
source

For a website parameter, TryHaskell is unlikely to cut it; its way to limit it.

codepad , OTOH, is more liberal and should be more useful.

But honestly, the bindist option is the best, clear!

+2
source

Try http://hiji.tinyrocket.se/ This is a haskell interpreter written using javascript.

http://ghc.io/ GHC.IO is a version of the Haskell interactive interpreter, ghci, which runs online in a web browser.

+2
source

Haskell has a web interpreter at http://tryhaskell.org/ . However, this may not provide sufficient functionality for your requirements.

+1
source

Source: https://habr.com/ru/post/1412302/


All Articles