@@ -176,9 +176,10 @@ completion = completeWord Nothing " \t\n\r" findCompletions
176176 getDeclName Nothing (P.ValueDeclaration ident _ _ _ _) = Just ident
177177 getDeclName (Just exts) (P.ValueDeclaration ident _ _ _ _) | isExported = Just ident
178178 where
179− isExported = flip any exts $ \e -> case e of
180− P.ValueRef ident' -> ident == ident'
181− _ -> False
179+ isExported = any exports exts
180+ exports (P.ValueRef ident') = ident == ident'
181+ exports (P.PositionedDeclarationRef _ r) = exports r
182+ exports _ = False
182183 getDeclName exts (P.PositionedDeclaration _ d) = getDeclName exts d
183184 getDeclName _ _ = Nothing
184185 names :: [P.Module] -> [String]