From bdaa2ec675dfbcf1d3a800fa35a7d11a82683bde Mon Sep 17 00:00:00 2001 From: Ruben Astudillo Date: Sat, 23 Aug 2014 04:00:40 -0400 Subject: [PATCH] browseIt with modified environment to solve #265 --- src/GHCModi.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/GHCModi.hs b/src/GHCModi.hs index 36d2696..d14de7f 100644 --- a/src/GHCModi.hs +++ b/src/GHCModi.hs @@ -316,5 +316,11 @@ browseIt :: IOish m -> ModuleString -> GhcModT m (String, Bool, Set FilePath) browseIt set mdl = do - ret <- browse mdl + let (det,rest') = break (== ' ') mdl + rest = dropWhile (== ' ') rest' + ret <- if det == "-d" + then withOptions setDetailed (browse rest) + else browse mdl return (ret, True, set) + where + setDetailed opt = opt { detailed = True }