CurryInfo: cpm-3.3.0 / CPM.AbstractCurry.readAbstractCurryFromPackagePath

definition:
readAbstractCurryFromPackagePath :: Package -> String -> [Package] -> String
                                 -> IO CurryProg
readAbstractCurryFromPackagePath pkg pkgDir deps modname = do
  let loadPath = fullLoadPathForPackage pkg pkgDir deps
  let params = setQuiet True (setFullPath loadPath defaultParams)
  callFrontendWithParams ACY params modname
  src <- lookupModuleSource loadPath modname
  let acyName = case src of
        Nothing -> error $ "Module not found: " ++ modname
        Just (_, file) -> replaceExtension (inCurrySubdirModule modname file) ".acy"
  readAbstractCurryFile acyName >>= return . addPrimTypes
 where
  -- work-around for missing Prelude.Char|Int|Float declarations:
  addPrimTypes p@(CurryProg mname imports dfltdecl clsdecls instdecls
                            typedecls funcdecls opdecls)
   | mname == pre && primType "Int" `notElem` typedecls
   = CurryProg mname imports dfltdecl clsdecls instdecls
               (map primType ["Int","Float","Char"] ++ typedecls)
               funcdecls opdecls
   | otherwise = p
   where pre = "Prelude"
         primType n = CType ("Prelude",n) Public [] [] []
demand:
no demanded arguments
deterministic:
deterministic operation
documentation:
--- Reads an AbstractCurry module from a package.
---
--- @param - dir the package's directory
--- @param - deps the resolved dependencies of the package
--- @param - mod the module to read
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_,_,_) |-> _}
name:
readAbstractCurryFromPackagePath
precedence:
no precedence defined
result-values:
_
signature:
CPM.Package.Package -> String -> [CPM.Package.Package] -> String
-> Prelude.IO AbstractCurry.Types.CurryProg
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term