2017-01-12 15:36:47 +00:00
|
|
|
module GhcMod.Boot where
|
2014-04-21 02:57:14 +00:00
|
|
|
|
2014-07-11 01:10:37 +00:00
|
|
|
import Control.Applicative
|
2015-08-03 01:09:56 +00:00
|
|
|
import Prelude
|
2017-01-12 15:36:47 +00:00
|
|
|
|
|
|
|
import GhcMod.Browse
|
|
|
|
import GhcMod.Flag
|
|
|
|
import GhcMod.Lang
|
|
|
|
import GhcMod.Modules
|
2014-05-10 11:51:35 +00:00
|
|
|
import Language.Haskell.GhcMod.Monad
|
2016-03-14 18:16:20 +00:00
|
|
|
import Language.Haskell.GhcMod.Types (defaultBrowseOpts)
|
2014-04-21 02:57:14 +00:00
|
|
|
|
2014-04-30 01:51:34 +00:00
|
|
|
-- | Printing necessary information for front-end booting.
|
2014-07-12 09:16:16 +00:00
|
|
|
boot :: IOish m => GhcModT m String
|
2015-06-01 14:54:50 +00:00
|
|
|
boot = concat <$> sequence ms
|
|
|
|
where
|
2016-03-14 18:16:20 +00:00
|
|
|
ms = [modules False, languages, flags, concat <$> mapM (browse defaultBrowseOpts) preBrowsedModules]
|
2014-04-21 07:30:31 +00:00
|
|
|
|
2014-04-21 02:57:14 +00:00
|
|
|
preBrowsedModules :: [String]
|
|
|
|
preBrowsedModules = [
|
|
|
|
"Prelude"
|
|
|
|
, "Control.Applicative"
|
|
|
|
, "Control.Exception"
|
|
|
|
, "Control.Monad"
|
|
|
|
, "Data.Char"
|
|
|
|
, "Data.List"
|
|
|
|
, "Data.Maybe"
|
|
|
|
, "System.IO"
|
|
|
|
]
|