@@ -1,5 +1,6 @@
1{-# LANGUAGE PatternGuards #-}
1{-# LANGUAGE PatternGuards #-}
2{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE OverloadedStrings #-}
3+{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
4-- | Generation of HTML documentation for Idris code
5-- | Generation of HTML documentation for Idris code
5module Idris.IdrisDoc (generateDocs) where
6module Idris.IdrisDoc (generateDocs) where
@@ -217,9 +218,11 @@ referredNss (n, Just d, _) =
217 names = concatMap (extractPTermNames) ts
218 names = concatMap (extractPTermNames) ts
218 in S.map getNs $ S.fromList names
219 in S.map getNs $ S.fromList names
220− where getFunDocs (FunDoc f) = [f]
221+ where getFunDocs (FunDoc f) = [f]
221− getFunDocs (DataDoc f fs) = f:fs
222+ getFunDocs (DataDoc f fs) = f:fs
222 getFunDocs (ClassDoc _ _ fs _ _ _ _) = fs
223 getFunDocs (ClassDoc _ _ fs _ _ _ _) = fs
224+ getFunDocs (NamedInstanceDoc _ fd) = [fd]
225+ getFunDocs (ModDoc _ _) = []
223 types (FD _ _ args t _) = t:(map second args)
226 types (FD _ _ args t _) = t:(map second args)
224 second (_, x, _, _) = x
227 second (_, x, _, _) = x
@@ -609,6 +612,8 @@ createOtherDoc ist (DataDoc fd@(FD n docstring args _ _) fds) = do
609 H.dt $ toHtml $ show name
612 H.dt $ toHtml $ show name
610 H.dd $ Docstrings.renderHtml docstring
613 H.dd $ Docstrings.renderHtml docstring
615+createOtherDoc ist (NamedInstanceDoc _ fd) = createFunDoc ist fd
612createOtherDoc ist (ModDoc _ docstring) = do
617createOtherDoc ist (ModDoc _ docstring) = do
613 Docstrings.renderHtml docstring
618 Docstrings.renderHtml docstring