discover :: FilePath -> Scope -> Section -> IO Section
discover dir scope z = do
    let dir' = Isolate.path dir (label z)
    let pipe s hole = maybe hole nextSpace <$> discover' dir' scope s hole
    subs <- subsections dir z
    discovered <- concatM (map pipe subs) (children z)
    return $ fromMaybe z $ parent discovered
discover :: FilePath -> Scope -> Section -> IO Section
discover dir scope z = do
    let dir' = Isolate.path dir (label z)
    let pipe s hole = maybe hole nextSpace <$> discover' dir' scope s hole
    subs <- subsections dir z
    discovered <- concatM (map pipe subs) (children z)
    return $ fromMaybe z $ parent discovered
discover dir scope z = do
    let dir' = Isolate.path dir (label z)
    let pipe s hole = maybe hole nextSpace <$> discover' dir' scope s hole
    subs <- subsections dir z
    discovered <- concatM (map pipe subs) (children z)
    return $ fromMaybe z $ parent discovered