sliceModules :: [H.Module SrcSpanInfo] -> [String] -> [H.Decl SrcSpanInfo]
sliceModules modules slicednames = decls'
    where
    decls = getTopDecls modules
    getDecl d = case getTopName d of
                      { Nothing -> Nothing
                      ; Just n -> if elem (nameString n) slicednames then Just d else Nothing
                      }
    decls' = catMaybes $ map getDecl decls
sliceModules :: [H.Module SrcSpanInfo] -> [String] -> [H.Decl SrcSpanInfo]
sliceModules modules slicednames = decls'
    where
    decls = getTopDecls modules
    getDecl d = case getTopName d of
                      { Nothing -> Nothing
                      ; Just n -> if elem (nameString n) slicednames then Just d else Nothing
                      }
    decls' = catMaybes $ map getDecl decls
sliceModules modules slicednames = decls'
    where
    decls = getTopDecls modules
    getDecl d = case getTopName d of
                      { Nothing -> Nothing
                      ; Just n -> if elem (nameString n) slicednames then Just d else Nothing
                      }
    decls' = catMaybes $ map getDecl decls