2

I have IPython and IPython Notbook installed and am working my way through the IHaskell installation instructions. I have all the IHaskell prerequisites installed, but before I commit to the final step of installing IHaskell itself with

cabal install ihaskell --reorder-goals

I want to confirm one — perhaps obvious — thing: Will I still be able to use Python Notebooks? The instructions following the step above seem to say that simply entering

ipython notebook

will run Haskell rather than Python, as if Haskell has replaced Python in IPython Notebooks. Is this the case? How do I specify whether I want to run Haskell or Python in a notebook, or in IPython itself for that matter? Can I switch freely between the two?


OS X 10.10.4; Xcode 6.4; CLT: 6.4.0.0.1; Clang: 6.1; Haskell Platform 7.10.2-a. Python 2.7.10 (Homebrew). Using Homebrew in general, but, following what appears to be Homebrew's recommendation, not for Haskell.

Community
  • 1
  • 1
orome
  • 45,163
  • 57
  • 202
  • 418
  • 1
    not specifically tried this with `Haskell`, but other languages are fine—when you create a new notebook you say which "kernel" you want to use this time – Sam Mason Aug 18 '15 at 11:00
  • @SamMason: That seems to be right. I'd accept an answer that describes how this works (based on your experience) with other kernels, and says it should also work with IHaskell (which it does). – orome Aug 20 '15 at 12:09

1 Answers1

1

Like other kernels, IHaskell can be added to IPython/Jupyter without interfering with other kernels. Once added Notebooks will recognize the language used in (suitably tagged) notebooks and will add an entry to the 'New' notebook menu that allows selection of the language to be used for new notebooks.

Each kernel will have its own command for adding itself to IPython/Jupyter. For IHaskell this is simply

ihaskell install
orome
  • 45,163
  • 57
  • 202
  • 418