Fix comments
This commit is contained in:
parent
829b5af62c
commit
2998849e99
@ -679,14 +679,14 @@ optionsPairsGrouped opts = do
|
|||||||
, optionInternalValue = internal
|
, optionInternalValue = internal
|
||||||
, optionExternalValue = pack $ show external
|
, optionExternalValue = pack $ show external
|
||||||
}
|
}
|
||||||
opts' = enumerateSublists opts -- :: [(grp, [(Int, (msg, a))])]
|
opts' = enumerateSublists opts -- :: [(msg, [(Int, (msg, a))])]
|
||||||
opts'' = map (\(x, ys) -> (mr x, map mkOption ys)) opts'
|
opts'' = map (\(x, ys) -> (mr x, map mkOption ys)) opts'
|
||||||
return $ mkOptionListGrouped opts''
|
return $ mkOptionListGrouped opts''
|
||||||
|
|
||||||
-- | Helper to enumerate sublists with one consecutive index.
|
-- | Helper to enumerate sublists with one consecutive index.
|
||||||
enumerateSublists :: [(a, [b])] -> [(a, [(Int, b)])]
|
enumerateSublists :: [(a, [b])] -> [(a, [(Int, b)])]
|
||||||
enumerateSublists xss =
|
enumerateSublists xss =
|
||||||
let --yss :: [(Int, (a, [b]))]
|
let -- yss :: [(Int, (a, [b]))]
|
||||||
yss = snd $ foldl (\(i, res) xs -> (i + (length.snd) xs, res ++ [(i, xs)])) (1, []) xss
|
yss = snd $ foldl (\(i, res) xs -> (i + (length.snd) xs, res ++ [(i, xs)])) (1, []) xss
|
||||||
in map (\(i, (x, ys)) -> (x, zip [i :: Int ..] ys)) yss
|
in map (\(i, (x, ys)) -> (x, zip [i :: Int ..] ys)) yss
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user