File: literate_haskell

package info (click to toggle)
ruby-rouge 4.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,836 kB
  • sloc: ruby: 38,168; sed: 2,071; perl: 152; makefile: 8
file content (11 lines) | stat: -rw-r--r-- 310 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
In Bird-style you have to leave a blank before the code.

> fact :: Integer -> Integer
> fact 0 = 1
> fact n = n * fact (n-1)
 
And you have to leave a blank line after the code as well.  Unless
> 0 lines of blank space are left, this won't be highlighted as code.
    
> main = do
>   putStrLn "Hello World!"