module Drasil.Website.Documentation where
import Language.Drasil
docsSec :: FilePath -> Section
docsSec :: FilePath -> Section
docsSec FilePath
path =
Sentence -> [Contents] -> [Section] -> Reference -> Section
section Sentence
haddockDocsTitle
[Sentence -> Contents
mkParagraph (Sentence -> Contents) -> Sentence -> Contents
forall a b. (a -> b) -> a -> b
$ FilePath -> Sentence
haddockDocsDesc FilePath
path]
[] (Reference -> Section) -> Reference -> Section
forall a b. (a -> b) -> a -> b
$ FilePath -> Sentence -> Reference
makeSecRef FilePath
"Documentation" (Sentence -> Reference) -> Sentence -> Reference
forall a b. (a -> b) -> a -> b
$ FilePath -> Sentence
S FilePath
"Documentation"
haddockDocsTitle :: Sentence
haddockDocsTitle :: Sentence
haddockDocsTitle = FilePath -> Sentence
S FilePath
"Haddock Documentation"
haddockDocsDesc :: FilePath -> Sentence
haddockDocsDesc :: FilePath -> Sentence
haddockDocsDesc FilePath
path = FilePath -> Sentence
S FilePath
"Drasil's framework is primarily written in Haskell, \
\so we use Haddock to document our code. The following link will take you \
\to the current" Sentence -> Sentence -> Sentence
+:+ Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef (FilePath -> Reference
docsRef FilePath
path) (FilePath -> Sentence
S FilePath
"Haddock documentation")
Sentence -> Sentence -> Sentence
+:+ FilePath -> Sentence
S FilePath
"for the Drasil framework. A variant with"
Sentence -> Sentence -> Sentence
+:+ Reference -> Sentence -> Sentence
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence -> Sentence
namedRef (FilePath -> Reference
fullDocsRef FilePath
path) (FilePath -> Sentence
S FilePath
"fully exposed modules") Sentence -> Sentence -> Sentence
+:+ FilePath -> Sentence
S FilePath
"is also available."
docsRef, fullDocsRef :: FilePath -> Reference
docsRef :: FilePath -> Reference
docsRef FilePath
path = FilePath -> FilePath -> ShortName -> Reference
makeURI FilePath
"haddockDocs" (FilePath
path FilePath -> FilePath -> FilePath
forall a. [a] -> [a] -> [a]
++ FilePath
"index.html") (ShortName -> Reference) -> ShortName -> Reference
forall a b. (a -> b) -> a -> b
$ Sentence -> ShortName
shortname' (Sentence -> ShortName) -> Sentence -> ShortName
forall a b. (a -> b) -> a -> b
$ FilePath -> Sentence
S FilePath
"HaddockDocs"
fullDocsRef :: FilePath -> Reference
fullDocsRef FilePath
path = FilePath -> FilePath -> ShortName -> Reference
makeURI FilePath
"fullHaddockDocs" (FilePath
path FilePath -> FilePath -> FilePath
forall a. [a] -> [a] -> [a]
++ FilePath
"full/index.html") (ShortName -> Reference) -> ShortName -> Reference
forall a b. (a -> b) -> a -> b
$ Sentence -> ShortName
shortname' (Sentence -> ShortName) -> Sentence -> ShortName
forall a b. (a -> b) -> a -> b
$ FilePath -> Sentence
S FilePath
"fullHaddockDocs"
docRefs :: FilePath -> [Reference]
docRefs :: FilePath -> [Reference]
docRefs FilePath
path = [FilePath -> Reference
docsRef FilePath
path, FilePath -> Reference
fullDocsRef FilePath
path]