From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Bottorff Subject: Haskell source blocks? Date: Wed, 22 Jun 2016 15:02:41 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1134ebb2f266740535e29420 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFnQB-0003oi-Bn for emacs-orgmode@gnu.org; Wed, 22 Jun 2016 15:02:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFnQA-0008LR-DP for emacs-orgmode@gnu.org; Wed, 22 Jun 2016 15:02:43 -0400 Received: from mail-oi0-x22f.google.com ([2607:f8b0:4003:c06::22f]:33115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFnQA-0008LF-8m for emacs-orgmode@gnu.org; Wed, 22 Jun 2016 15:02:42 -0400 Received: by mail-oi0-x22f.google.com with SMTP id u201so36463342oie.0 for ; Wed, 22 Jun 2016 12:02:41 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode Mailinglist --001a1134ebb2f266740535e29420 Content-Type: text/plain; charset=UTF-8 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 --001a1134ebb2f266740535e29420 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'm guessing Haskell and org-mode Babel aren't rea= lly a great match? After installing haskell-mode, I've tried

#+begin_src haskell=C2=A0
doubleMe x =3D x + x=C2= =A0
#+end_src

which isn't working . = . . because it isn't allowed in the ghci?

#+be= gin_src haskell=C2=A0
let doubleMe x =3D x + x=C2=A0
#+= end_src

works. However,

=
#+begin_src haskell
let doubleSmallNumber4 x =3D if x &= gt; 0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 then x=C2=A0
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0else x*2=C2=A0
#+end_src

complains of a parsing error on else. How does Haskell work in org = mode?

LB
--001a1134ebb2f266740535e29420--