--- /dev/null
+5
\ No newline at end of file
--- /dev/null
+Example taken from http://www.haskell.org/onlinereport/literate.html,
+with additional tripping characters.
+This literate > program > prompts the user for a number
+>and prints the factorial of that number:
+This is the factorial function.
--- /dev/null
+0
\ No newline at end of file
--- /dev/null
+> main :: IO ()
+> main = do putStr "Enter a number: "
+> l <- readLine
+> putStr "n!= "
+> print (fact (read l))
+> fact :: Integer -> Integer
+> fact 0 = 1
+> fact n = n * fact (n-1)
--- /dev/null
+6
\ No newline at end of file
--- /dev/null
+\documentstyle{article}
+\begin{document}
+\section{Introduction}
+Example taken from http://www.haskell.org/onlinereport/literate.html,
+with additional tripping characters.
+This is a trivial \begin{code}program\end{code} that prints the first 20 factorials.
+\begin{code}
+\end{code}
+\end{document}
--- /dev/null
+0
\ No newline at end of file
--- /dev/null
+main :: IO ()
+main = print [ (n, product [1..n]) | n <- [1..20]]
--- /dev/null
+Example taken from http://www.haskell.org/onlinereport/literate.html,
+with additional tripping characters.
+
+ This literate > program > prompts the user for a number
+ >and prints the factorial of that number:
+
+> main :: IO ()
+
+> main = do putStr "Enter a number: "
+> l <- readLine
+> putStr "n!= "
+> print (fact (read l))
+
+ This is the factorial function.
+
+> fact :: Integer -> Integer
+> fact 0 = 1
+> fact n = n * fact (n-1)
--- /dev/null
+\documentstyle{article}
+
+\begin{document}
+
+\section{Introduction}
+
+Example taken from http://www.haskell.org/onlinereport/literate.html,
+with additional tripping characters.
+
+This is a trivial \begin{code}program\end{code} that prints the first 20 factorials.
+
+\begin{code}
+main :: IO ()
+main = print [ (n, product [1..n]) | n <- [1..20]]
+\end{code}
+
+\end{document}
--- /dev/null
+require File.dirname(__FILE__) + '/../test_helper'
+
+class Ohcount::LitHaskellTest < Ohcount::Test
+ def test_comprehensive
+ verify_parse("lithask1.lhs")
+ verify_parse("lithask2.lhs")
+ end
+end