0

I have this

#+begin_src haskell :results silent :exports code
:{
maximum'' :: (Ord a) => [a] -> a  
maximum'' = foldl1 (\x acc -> if x > acc then x else acc) 
:}
#+end_src

but on export to HTML (or LaTex) I'd like to suppress the :{ and :} to just show the code

maximum'' :: (Ord a) => [a] -> a  
maximum'' = foldl1 (\x acc -> if x > acc then x else acc)

Also, this

#+begin_src haskell :results verbatim :exports both
maximum'' [1,3,5,2,4]
#+end_src

I'd like to export the code part with a > REPL prompt included, e.g.,

> maximum'' [1,3,5,2,4]

I once saw some similar tricks, but I've searched and searched and can't find them again. There's probably other html export formatting I'd like too, but if anyone can point me to that mystery doc I'd appreciate it.

1
  • I'd look into filters - maybe. That was the first thing that popped into my head but I haven't thought it through to make sure it makes sense: "cum grano salis" is applicable. – NickD Jun 2 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.