@@ -45,6 +45,7 @@ runIdris opts = do
4545 when (ShowIncs `elem` opts) $ runIO showIncs
4646 when (ShowLibs `elem` opts) $ runIO showLibs
4747 when (ShowLibdir `elem` opts) $ runIO showLibdir
48+ when (ShowPkgs `elem` opts) $ runIO showPkgs
4849 case opt getClient opts of
4950 [] -> return ()
5051 (c:_) -> do setVerbose False
@@ -92,3 +93,10 @@ showIncs :: IO b
9293showIncs = do incFlags <- getIncFlags
9394 putStrLn $ unwords incFlags
9495 exitWith ExitSuccess
96+
97+-- | List idris packages installed
98+showPkgs :: IO b
99+showPkgs = do dir <- getIdrisLibDir
100+ pkgs <- getDirectoryContents dir
101+ mapM putStrLn (filter (/= ".") . filter (/= "..") $ pkgs)
102+ exitWith ExitSuccess