/f.hs Secret
Created
November 30, 2022 09:29
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