From 3f50b955324bd4b42f88a421f0203bc46a3ccf64 Mon Sep 17 00:00:00 2001 From: Dominic Steinitz Date: Sat, 16 May 2015 13:53:14 +0100 Subject: Fix the documentation for haddock itself. Change notation and add support for inline math. Allow newlines in display math. Add a command line option for the mathjax url (you might want to use a locally installed version). Rebase tests because of extra url and version change. Respond to (some of the) comments. Fix warnings in InterfaceFile.hs --- haddock-api/src/Haddock/InterfaceFile.hs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'haddock-api/src/Haddock/InterfaceFile.hs') diff --git a/haddock-api/src/Haddock/InterfaceFile.hs b/haddock-api/src/Haddock/InterfaceFile.hs index 73185092..12fa5a93 100644 --- a/haddock-api/src/Haddock/InterfaceFile.hs +++ b/haddock-api/src/Haddock/InterfaceFile.hs @@ -473,7 +473,6 @@ instance (Binary mod, Binary id) => Binary (MetaDoc mod id) where d <- get bh return $ MetaDoc { _meta = m, _doc = d } -{-* Generated by DrIFT : Look, but Don't Touch. *-} instance (Binary mod, Binary id) => Binary (DocH mod id) where put_ bh DocEmpty = do putByte bh 0 @@ -538,6 +537,12 @@ instance (Binary mod, Binary id) => Binary (DocH mod id) where put_ bh (DocHeader aa) = do putByte bh 20 put_ bh aa + put_ bh (DocMathInline x) = do + putByte bh 21 + put_ bh x + put_ bh (DocMathDisplay x) = do + putByte bh 22 + put_ bh x get bh = do h <- getByte bh @@ -605,6 +610,12 @@ instance (Binary mod, Binary id) => Binary (DocH mod id) where 20 -> do aa <- get bh return (DocHeader aa) + 21 -> do + x <- get bh + return (DocMathInline x) + 22 -> do + x <- get bh + return (DocMathDisplay x) _ -> error "invalid binary data found in the interface file" -- cgit v1.2.3