emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Support for Bird-style Literate Haskell
@ 2011-11-24 10:31 Jean-Marie Gaillourdet
  2011-11-25 12:48 ` Stephen Eglen
  2011-11-25 16:43 ` Eric Schulte
  0 siblings, 2 replies; 3+ messages in thread
From: Jean-Marie Gaillourdet @ 2011-11-24 10:31 UTC (permalink / raw)
  To: emacs-orgmode List

Hi everybody,

I'd be interested to use org syntax in the comments of a literate haskell file. I know and use occasionally org-babel. Though, this question is not about org-babel. I am merely interested in telling org-mode to leave the code parts of a literate Haskell file alone, i.e. similar to code blocks in org-mode. I have no propblem with switching between org-mode and literate-haskell-mode depending on what I am currently editing. I am not interested in org-babel because I don't want to have a separate weaving step in my build system.

In case you don't know: Literate Haskell files (ending with .lhs) come in two flavors: bird style and latex style. In bird style every line is a comment unless it has '>' in the first column. And in latex style code blocks are surround with \begin{code} and \end{code}. Haskell implementations do not care what is in the non-code parts. So, I'd like to use org markup and especially the editing features of org-mode. I'd prefer to work in bird-style and latex-style would be fine as well.

Do you have any ideas/pointers how to achieve that?

Thanks for your help!

Cheers, 
 Jean

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Support for Bird-style Literate Haskell
  2011-11-24 10:31 Support for Bird-style Literate Haskell Jean-Marie Gaillourdet
@ 2011-11-25 12:48 ` Stephen Eglen
  2011-11-25 16:43 ` Eric Schulte
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Eglen @ 2011-11-25 12:48 UTC (permalink / raw)
  To: emacs-orgmode

Jean-Marie Gaillourdet <jmg@gaillourdet.net> writes:

> I'd be interested to use org syntax in the comments of a literate
> haskell file. I know and use occasionally org-babel. Though, this
> question is not about org-babel. I am merely interested in telling
> org-mode to leave the code parts of a literate Haskell file alone,
> i.e. similar to code blocks in org-mode. I have no propblem with
> switching between org-mode and literate-haskell-mode depending on what
> I am currently editing. I am not interested in org-babel because I
> don't want to have a separate weaving step in my build system.
>
> In case you don't know: Literate Haskell files (ending with .lhs) come
> in two flavors: bird style and latex style. In bird style every line
> is a comment unless it has '>' in the first column. And in latex style
> code blocks are surround with \begin{code} and \end{code}. Haskell
> implementations do not care what is in the non-code parts. So, I'd
> like to use org markup and especially the editing features of
> org-mode. I'd prefer to work in bird-style and latex-style would be
> fine as well.


Check out Dave Love's work, it does latex-style, but not bird style.
 www.loveshack.ukfsn.org/emacs/haskell-latex.el

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Support for Bird-style Literate Haskell
  2011-11-24 10:31 Support for Bird-style Literate Haskell Jean-Marie Gaillourdet
  2011-11-25 12:48 ` Stephen Eglen
@ 2011-11-25 16:43 ` Eric Schulte
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Schulte @ 2011-11-25 16:43 UTC (permalink / raw)
  To: Jean-Marie Gaillourdet; +Cc: emacs-orgmode List

Hi Jean,

Look at the `org-babel-haskell-export-to-lhs' function defined in
ob-haskell.el.  It should be usable to export an Org-mode file with
Haskell code blocks to a latex-style .lhs file with Haskell code blocks.

Best -- Eric

Jean-Marie Gaillourdet <jmg@gaillourdet.net> writes:

> Hi everybody,
>
> I'd be interested to use org syntax in the comments of a literate
> haskell file. I know and use occasionally org-babel. Though, this
> question is not about org-babel. I am merely interested in telling
> org-mode to leave the code parts of a literate Haskell file alone,
> i.e. similar to code blocks in org-mode. I have no propblem with
> switching between org-mode and literate-haskell-mode depending on what
> I am currently editing. I am not interested in org-babel because I
> don't want to have a separate weaving step in my build system.
>
> In case you don't know: Literate Haskell files (ending with .lhs) come
> in two flavors: bird style and latex style. In bird style every line
> is a comment unless it has '>' in the first column. And in latex style
> code blocks are surround with \begin{code} and \end{code}. Haskell
> implementations do not care what is in the non-code parts. So, I'd
> like to use org markup and especially the editing features of
> org-mode. I'd prefer to work in bird-style and latex-style would be
> fine as well.
>
> Do you have any ideas/pointers how to achieve that?
>
> Thanks for your help!
>
> Cheers, 
>  Jean

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-25 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-24 10:31 Support for Bird-style Literate Haskell Jean-Marie Gaillourdet
2011-11-25 12:48 ` Stephen Eglen
2011-11-25 16:43 ` Eric Schulte

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).