Skip to content

Commit

Permalink
Render library with empty name, sol#483.
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Mar 16, 2022
1 parent 5a16f09 commit 32b61ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Hpack/Render.hs
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@ renderLibraries :: Map String (Section Library) -> [Element]
renderLibraries = map renderNamedLibrary . Map.toList

renderNamedLibrary :: (String, Section Library) -> Element
renderNamedLibrary (name, sect) =
Stanza ("library " ++ name) (renderLibrarySection sect)
renderNamedLibrary (name, sect)
| "" <- name = Stanza "library" (renderLibrarySection sect)
| otherwise = Stanza ("library " ++ name) (renderLibrarySection sect)

renderExecutables :: Map String (Section Executable) -> [Element]
renderExecutables = map renderExecutable . Map.toList
Expand Down

0 comments on commit 32b61ee

Please sign in to comment.