Skip to content

Commit

Permalink
show import with public keyword in the html doc
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira authored and jonaprieto committed Oct 23, 2023
1 parent 37de293 commit bfa41e2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Juvix/Compiler/Backend/Html/Translation/FromTyped.hs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ goStatement = \case
StatementOpenModule t -> goOpen t
StatementFunctionDef t -> goFunctionDef t
StatementSyntax s -> goSyntax s
StatementImport {} -> mempty
StatementImport s -> goImport s
StatementModule m -> goLocalModule m
StatementProjectionDef {} -> mempty
where
Expand Down Expand Up @@ -502,6 +502,11 @@ goLocalModule def = fmap (fromMaybe mempty) . runFail $ do
<$> mconcatMap goStatement (def ^. moduleBody)
return (header' <> body')

goImport :: forall r. (Members '[Reader HtmlOptions] r) => Import 'Scoped -> Sem r Html
goImport op
| Just Public <- op ^? importOpen . _Just . openPublic = noDefHeader <$> ppCodeHtml defaultOptions op
| otherwise = mempty

goOpen :: forall r. (Members '[Reader HtmlOptions] r) => OpenModule 'Scoped -> Sem r Html
goOpen op
| Public <- op ^. openModuleParams . openPublic = noDefHeader <$> ppCodeHtml defaultOptions op
Expand Down

0 comments on commit bfa41e2

Please sign in to comment.