I'm writing a documentation for a Haskell module with great number of tests and examples. This make my source file very long (3000 lines).
My idea is to make a second source file (*.hs) with my full examples and only documentation (no functions definitions). But when I write my documentation, I can't have my headers appear correctly:
module JeanJouX.Numeric.Tests (
-- | Introduction to my module
--
-- * Section 1
-- ** Sub section 1
-- doc text
-- ...
-- * Section 2
-- ** Sub section 1
--
But when I break my source like this :
module JeanJouX.Numeric.Tests (
-- | Introduction to my module
--
-- * Section 1
-- ** Sub section 1
-- doc text
-- ...
-- * Section 2
-- ** Sub section 1
--
My documentation text doesn't appear (I think Haddock is waiting for a function export).
Is it possible to make a Haskell source file with documentation only this way ?
Is there a better way to do it ?