-- look for exact match first, then the first prefix match
case [ c | c <- cmds, str == cmdName c ] of
c:_ -> return (Just c)
-- look for exact match first, then the first prefix match
case [ c | c <- cmds, str == cmdName c ] of
c:_ -> return (Just c)
- [] -> case [ c | c@(s,_,_,_) <- cmds, prefixMatch str s ] of
+ [] -> case [ c | c@(s,_,_,_) <- cmds, str `isPrefixOf` s ] of
names <- GHC.parseName session str
let filtered = filterOutChildren names
mb_stuffs <- mapM (GHC.getInfo session) filtered
unqual <- GHC.getPrintUnqual session
putStrLn (showSDocForUser unqual $
vcat (intersperse (text "") $
names <- GHC.parseName session str
let filtered = filterOutChildren names
mb_stuffs <- mapM (GHC.getInfo session) filtered
unqual <- GHC.getPrintUnqual session
putStrLn (showSDocForUser unqual $
vcat (intersperse (text "") $
-- Filter out names whose parent is also there Good
-- example is '[]', which is both a type and data
-- Filter out names whose parent is also there Good
-- example is '[]', which is both a type and data
-pprInfo exts (thing, fixity, insts)
- = pprTyThingInContextLoc exts thing
+pprInfo :: PrintExplicitForalls -> (TyThing, Fixity, [GHC.Instance]) -> SDoc
+pprInfo pefas (thing, fixity, insts)
+ = pprTyThingInContextLoc pefas thing
)))
-- ToDo: modInfoInstances currently throws an exception for
-- package modules. When it works, we can do this:
)))
-- ToDo: modInfoInstances currently throws an exception for
-- package modules. When it works, we can do this:
-- If the highlight flag is True, also highlight the span using
-- start_bold/end_bold.
listAround span do_highlight = do
-- If the highlight flag is True, also highlight the span using
-- start_bold/end_bold.
listAround span do_highlight = do