diff options
-rw-r--r-- | src/LambdaCube/Compiler.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/LambdaCube/Compiler.hs b/src/LambdaCube/Compiler.hs index d1c178ec..ecbf2da5 100644 --- a/src/LambdaCube/Compiler.hs +++ b/src/LambdaCube/Compiler.hs | |||
@@ -97,7 +97,7 @@ type ModuleFetcher m = Maybe FilePath -> Either FilePath MName -> m (Either Doc | |||
97 | ioFetch :: MonadIO m => [FilePath] -> ModuleFetcher (MMT m x) | 97 | ioFetch :: MonadIO m => [FilePath] -> ModuleFetcher (MMT m x) |
98 | ioFetch paths' imp n = do | 98 | ioFetch 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>>"-}preludePath)] | 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) |