apachejspωiki
  • G’day (anonymous guest)
  • User Preferences Log in
  • Recent Searches
2015-08-26-Literate-Haskell
Your trail: 
  • ☰
  • 2015-08-26-Literate-Haskell
  • Attach
  • Edit
  • More...
    • View Page Source
    • Show Reader View
    • Recent Changes
      Page Index
      SystemInfo

      UnusedPages
      UndefinedPages

This page (revision-1) was last changed on 22-Jan-2017 03:48 by UnknownAuthor  

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

History

Version Date Modified Size Author Changes ... Change note

Page References

Incoming links Outgoing links
2015-08-26-Literate-Haskell
  • GithubPagesBlogEntries
2015-08-26-Literate-Haskell

Difference

Difference between version and

At line 1 added 20 lines
!!!Making Literate Haskell present nicely
So, you can write "text" (blog entries, plain text, LaTeX, whatever) that is both readable by humans __and__ readable
by computers. The same text. This is done by inverting documentation (comments) and code: you don't use special marks
to indicate comments, but you __do__ use special marks to indicate __code__.
Use something like the following to generate literate haskell from your ordinary Haskell:
{{{
../Literate/hs2lhs find-common-resources.hs >| find-common-resources.lhs
}}}
(Install hs2lhs from [https://github.com/jeffreyrosenbluth/Literate|https://github.com/jeffreyrosenbluth/Literate].)
See [this blog entry|http://passingcuriosity.com/2008/literate-haskell-with-markdown-syntax-hightlighting/] (or
whatever it is) on how.
The first problem with this is that everything just goes ripping straight down the left margin, and that, in my
opinion, really impacts readability in a bad way. I'm a huge fan of the hanging indent and indented code, so I'll be
fixing up the CSS to provide that.
This page (revision-1) was last changed on 22-Jan-2017 03:48 by UnknownAuthor   Top

About
Help
SysInfo

(page = LeftMenu)

Admin

(page = LeftMenuFooter)

JSPWiki v2.10.2  
JSPWiki v2.10.2