From d007c539458c290c2c577596084f9a93d61e027c Mon Sep 17 00:00:00 2001 From: Jeroen Engels Date: Wed, 7 Apr 2021 13:27:38 +0200 Subject: [PATCH] Add links to type aliases --- src/frontend/Page/Docs/Block.elm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/frontend/Page/Docs/Block.elm b/src/frontend/Page/Docs/Block.elm index 04d72156..ad24f238 100644 --- a/src/frontend/Page/Docs/Block.elm +++ b/src/frontend/Page/Docs/Block.elm @@ -185,11 +185,19 @@ type alias TypeNameDict = makeInfo : String -> String -> Maybe V.Version -> String -> List Docs.Module -> Info makeInfo author project version moduleName docsList = let - addUnion home union docs = - Dict.insert (home ++ "." ++ union.name) (home, union.name) docs + addType home typeName docs = + Dict.insert (home ++ "." ++ typeName) ( home, typeName ) docs addModule docs dict = - List.foldl (addUnion docs.name) dict docs.unions + let + types : List String + types = + List.concat + [ List.map .name docs.unions + , List.map .name docs.aliases + ] + in + List.foldl (addType docs.name) dict types in Info author project version moduleName <| List.foldl addModule Dict.empty docsList