summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/LambdaCube/Compiler.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/LambdaCube/Compiler.hs b/src/LambdaCube/Compiler.hs
index ecbf2da5..c0fef7a0 100644
--- a/src/LambdaCube/Compiler.hs
+++ b/src/LambdaCube/Compiler.hs
@@ -98,7 +98,7 @@ ioFetch :: MonadIO m => [FilePath] -> ModuleFetcher (MMT m x)
98ioFetch paths' imp n = do 98ioFetch paths' imp n = do
99 preludePath <- (</> "lc") <$> liftIO getDataDir 99 preludePath <- (</> "lc") <$> liftIO getDataDir
100 let paths = map (id &&& id) paths' ++ [(preludePath, "<<installed-prelude-path>>")] 100 let paths = map (id &&& id) paths' ++ [(preludePath, "<<installed-prelude-path>>")]
101 find ((x, (x', mn)): xs) = liftIO (readFileIfExists x) >>= maybe (find xs) (\src -> return $ Right (x', mn, liftIO src)) 101 find ((x, (x', mn)): xs) = liftIO (readFileIfExists x) >>= maybe (find xs) (\src -> return $ Right (x, mn, liftIO src))
102 find [] = return $ Left $ "can't find" <+> either (("lc file" <+>) . text) (("module" <+>) . text) n 102 find [] = return $ Left $ "can't find" <+> either (("lc file" <+>) . text) (("module" <+>) . text) n
103 <+> "in path" <+> hsep (text . snd <$> paths) 103 <+> "in path" <+> hsep (text . snd <$> paths)
104 find $ nubBy ((==) `on` fst) $ map (first normalise . lcModuleFile) paths 104 find $ nubBy ((==) `on` fst) $ map (first normalise . lcModuleFile) paths