File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import Control.Monad.Reader
88
99import Data.Functor ( (<&>) )
1010import Data.Bifunctor ( bimap )
11- import Data.List ( intercalate , isPrefixOf )
11+ import Data.List ( intercalate , isPrefixOf , stripPrefix )
1212import Data.Text ( unpack )
1313import qualified Data.Map.Strict as Map
1414
@@ -210,7 +210,12 @@ compileQName f
210210 in (mod', Just (Import mod' qual Nothing hf maybeIsType))
211211 else (mod , Nothing )
212212 | otherwise
213- = (mod , Just (Import mod qual par hf maybeIsType))
213+ = let mod' = dropHaskellPrefix mod
214+ in (mod', Just (Import mod' qual par hf maybeIsType))
215+
216+ dropHaskellPrefix :: Hs. ModuleName () -> Hs. ModuleName ()
217+ dropHaskellPrefix (Hs. ModuleName l s) =
218+ Hs. ModuleName l $ fromMaybe s $ stripPrefix " Haskell." s
214219
215220isWhereFunction :: QName -> C Bool
216221isWhereFunction f = do
You can’t perform that action at this time.
0 commit comments