-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find package #143
Comments
That looks like a bug. |
The package handling between MicroCabal and MicroHs could use improvement.
Notes about the peculiarities of the Nix build environment:
As for your own issues, have you tried running the failing command with |
Yes, MicroCabal needs a lot of changes for any non-standard use case (i.e., not my use case). |
instrumenting with some prints shows that it was trying to load fix that seems to work for me: diff --git a/src/MicroHs/Compile.hs b/src/MicroHs/Compile.hs
index 2ed6923e..bea76d0c 100644
--- a/src/MicroHs/Compile.hs
+++ b/src/MicroHs/Compile.hs
@@ -434,16 +434,16 @@ loadDependencies flags = do
loadedPkgs <- gets getPkgs
let deps = concatMap pkgDepends loadedPkgs
loaded = map pkgName loadedPkgs
- deps' = [ p | (p, _v) <- deps, p `notElem` loaded ]
+ deps' = [ pv | pv@(p, _v) <- deps, p `notElem` loaded ]
if null deps' then
return ()
else do
mapM_ (loadDeps flags) deps'
loadDependencies flags -- loadDeps can add new dependencies
-loadDeps :: Flags -> IdentPackage -> CM ()
-loadDeps flags pid = do
- mres <- liftIO $ openFilePath (pkgPath flags) (packageDir </> unIdent pid <.> packageSuffix)
+loadDeps :: Flags -> (IdentPackage, Version) -> CM ()
+loadDeps flags (pid, pver) = do
+ mres <- liftIO $ openFilePath (pkgPath flags) (packageDir </> unIdent pid ++ "-" ++ showVersion pver <.> packageSuffix)
case mres of
Nothing -> error $ "Cannot find package " ++ showIdent pid
Just (pfn, hdl) -> do at least my code now gets past that stage and reports an error about |
You can Data.Coerce.coerce between Double and CDouble. But I'll fix that bug. |
Hi, thanks for this interesting program!
I have up to now been using https://github.com/claudeha/Hugs/tree/OverloadedStrings but suffer bad problems like the dreaded Hugs Control Stack Overflow with more complicated programs.
But there seems to be some issue with
mhs
(ormcabal
), which claims it can't find packages (e.g.transformers
) that have been installed (and have indeed been successfully used to install dependent package, e.g.mtl
):(The
+RTS -H10M -RTS
is to avoid OOM kill, my test machine has only 2GB RAM + 1GB swap..)Am I doing something wrong or is this a bug?
The text was updated successfully, but these errors were encountered: