Verified Commit 822af947 authored by Camil Staps's avatar Camil Staps 🚀

Make work on master compiler

parent f5df31fa
Pipeline #18788 passed with stage
in 1 minute and 7 seconds
......@@ -15,7 +15,7 @@ import Clean.Parse
import Clean.Parse.Comments
from Clean.PrettyPrint import class cpp(cpp), instance cpp ParsedDefinition
import Control.Applicative
import Control.Monad => qualified join
from Control.Monad import class Monad(..), =<<
import Data.Either
import Data.Error
from Data.Func import $, instance Functor ((->) a)
......
......@@ -9,10 +9,10 @@ import StdOrdList
import StdString
import StdTuple
import Clean.Doc => qualified :: ParamDoc{name}
import Clean.Doc
import Clean.Types.Util
import Control.Applicative
import Control.Monad => qualified join
from Control.Monad import class Monad(..), =<<
import Data.Error
from Data.Func import $, mapSt, instance Functor ((->) a)
import Data.Functor
......@@ -27,7 +27,8 @@ import Text.HTML
import Text.Language
import Clean.Doc.ModuleCollection
import Clean.Doc.ModuleCollection.Index => qualified :: IndexItem{name}
from Clean.Doc.ModuleCollection.Index import indexModuleCollection,
:: IndexItem
:: WebSite :== [(FilePath, String)]
......@@ -84,17 +85,17 @@ where
[ Just $ HrefAttr (relativePath thispath)
, if (fp == thispath) (Just $ ClassAttr "active") Nothing
])
[Text dm.name]
[Text dm.Described.name]
]
where thispath = "mod" </> dm.name +++ ".html"
where thispath = "mod" </> dm.Described.name +++ ".html"
moduleFile :: !DescribedModule -> (FilePath, HtmlTag)
moduleFile m = (thisfp, html)
where
thisfp = "mod" </> m.name +++ ".html"
thisfp = "mod" </> m.Described.name +++ ".html"
html = DivTag [] $ catMaybes
[ Just $ H1Tag [IdAttr ("mod-" +++ m.name)] [Text m.name]
[ Just $ H1Tag [IdAttr ("mod-" +++ m.Described.name)] [Text m.Described.name]
, DivTag [ClassAttr "clean-doc"] <$> pure <$> Text <$> (docDescription =<< m.doc)
, Just $ DivTag [IdAttr "type_defs"] typedefs
, Just $ DivTag [IdAttr "classes"] classes
......@@ -108,7 +109,7 @@ where
: map html (sort m.elem.mod_type_defs)
]
where
html dtd = collapsable thisfp "typedef" ("td-" +++ dtd.name) dtd.name dtd.pos $ catMaybes
html dtd = collapsable thisfp "typedef" ("td-" +++ dtd.Described.name) dtd.Described.name dtd.pos $ catMaybes
[ DivTag [ClassAttr "clean-doc"] <$> pure <$> Text <$> (docDescription =<< dtd.doc)
, itemizedDoc "Type variable" =<< docVars <$> dtd.doc
, Just $ PreTag [ClassAttr "clean-code"] [Text $ case childdocs of
......@@ -129,7 +130,7 @@ where
: map html (sort m.elem.mod_classes)
]
where
html dc = collapsable thisfp "class" ("class-" +++ dc.name) dc.name dc.pos $ catMaybes
html dc = collapsable thisfp "class" ("class-" +++ dc.Described.name) dc.Described.name dc.pos $ catMaybes
[ DivTag [ClassAttr "clean-doc"] <$> pure <$> Text <$> (docDescription =<< dc.doc)
, Just $ PreTag [ClassAttr "clean-code"] [Text (fromJust dc.repr)]
]
......@@ -140,7 +141,7 @@ where
: map html (sort xs)
]
where
html df = collapsable thisfp kind (slug +++ "-" +++ df.name) df.name df.pos $ catMaybes
html df = collapsable thisfp kind (slug +++ "-" +++ df.Described.name) df.Described.name df.pos $ catMaybes
[ DivTag [ClassAttr "clean-doc"] <$> pure <$> Text <$> (docDescription =<< df.doc)
, PTag [ClassAttr "clean-doc"] <$> pure <$> Text <$> (docComplexity =<< df.doc)
, itemizedDoc "Type variable" =<< docVars <$> df.doc
......@@ -149,7 +150,7 @@ where
, itemizedDoc "May throw exception" =<< docThrows <$> df.doc
, Just $ PreTag [ClassAttr "clean-code"] [Text $ case docType =<< df.doc of
Nothing -> fromJust df.repr
Just t -> df.name +++ " :: " +++ t <+ "\n" +++ fromJust df.repr]
Just t -> df.Described.name +++ " :: " +++ t <+ "\n" +++ fromJust df.repr]
]
itemizedDoc :: !String ![a] -> Maybe HtmlTag | toString a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment