* Haskell source blocks?
@ 2016-06-22 19:02 Lawrence Bottorff
2016-06-22 20:19 ` Anthony Cowley
0 siblings, 1 reply; 2+ messages in thread
From: Lawrence Bottorff @ 2016-06-22 19:02 UTC (permalink / raw)
To: emacs-orgmode Mailinglist
[-- Attachment #1: Type: text/plain, Size: 515 bytes --]
I'm guessing Haskell and org-mode Babel aren't really a great match? After
installing haskell-mode, I've tried
#+begin_src haskell
doubleMe x = x + x
#+end_src
which isn't working . . . because it isn't allowed in the ghci?
#+begin_src haskell
let doubleMe x = x + x
#+end_src
works. However,
#+begin_src haskell
let doubleSmallNumber4 x = if x > 0
then x
else x*2
#+end_src
complains of a parsing error on else. How does Haskell work in org mode?
LB
[-- Attachment #2: Type: text/html, Size: 871 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Haskell source blocks?
2016-06-22 19:02 Haskell source blocks? Lawrence Bottorff
@ 2016-06-22 20:19 ` Anthony Cowley
0 siblings, 0 replies; 2+ messages in thread
From: Anthony Cowley @ 2016-06-22 20:19 UTC (permalink / raw)
To: emacs-orgmode Mailinglist
Lawrence Bottorff writes:
> I'm guessing Haskell and org-mode Babel aren't really a great match? After
> installing haskell-mode, I've tried
>
> #+begin_src haskell
> doubleMe x = x + x
> #+end_src
>
> which isn't working . . . because it isn't allowed in the ghci?
>
> #+begin_src haskell
> let doubleMe x = x + x
> #+end_src
>
> works. However,
>
> #+begin_src haskell
> let doubleSmallNumber4 x = if x > 0
> then x
> else x*2
> #+end_src
>
> complains of a parsing error on else. How does Haskell work in org mode?
>
> LB
I use IHaskell with ob-ipython. It does what you want from babel and even makes in-line figure generation relatively painless.
Anthony
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-22 20:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-22 19:02 Haskell source blocks? Lawrence Bottorff
2016-06-22 20:19 ` Anthony Cowley
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).