-
-
Save dminuoso/d8558ad3235d6d2b93194d7bd49106ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | Turn a redundancy group into an inventory.ini block. We assume it's already grouped, so we just look at the first | |
-- element to figure out the redundancy group label. | |
rdGroup :: NE.NonEmpty HostMeta -> Maybe (Doc ()) | |
rdGroup (x NE.:| xs) = case hostRdGrp x of | |
Nothing -> Nothing | |
Just label -> Just $ (vsep (brackets (rdGrpLabel label) | |
: (toHost rf `mapMaybe` (x : xs)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment