Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
curry
curry-tools
Commits
56edcd2b
Commit
56edcd2b
authored
Jan 16, 2018
by
Michael Hanus
Browse files
CPM updated
parent
843cd63a
Changes
3
Hide whitespace changes
Inline
Side-by-side
cpm/docs/currysystem_manual.tex
View file @
56edcd2b
...
...
@@ -20,12 +20,13 @@ Now you can show a short list of all packages in this index by
%
\begin{curry}
> cypm list
Name Synopsis Version
---- -------- -------
addtypes A tool to add missing type signatures in a Curry 0.0.1
program
binint Libraries with a binary representation of natural 0.0.1
and integers
Name Synopsis Version
---- -------- -------
abstract-curry Libraries to deal with AbstractCurry programs 2.0.0
abstract-haskell Libraries to represent Haskell programs in Curry 2.0.0
addtypes A tool to add missing type signatures in a Curry 2.0.0
program
base Base libraries for Curry systems 1.0.0
$
\ldots
$
\end{curry}
%
...
...
cpm/docs/manual.tex
View file @
56edcd2b
...
...
@@ -921,11 +921,12 @@ are documented.
Using the option
\code
{
--modules
}
, one can also specify a comma-separated
list of module names to be documented.
In the default case, modules
from
packages used by the current package
In the default case, modules
contained in
packages used by the current package
are not documented. Instead, it is assumed that these packages are
already documented
\footnote
{
See
\url
{
http://www.informatik.uni-kiel.de/~mh/curry/cpm/
}
for the documentation of all packages.
}
\url
{
http://www.informatik.uni-kiel.de/~curry/cpm/
}
for the documentation of all packages. This default location
can be changed with the option
\code
{
--url
}
.
}
so that links to these package documentations are generated.
Using the option
\code
{
--full
}
, one can generate also the documentation
of packages used by the current package. This might be reasonable
...
...
cpm/src/CPM/Repository.curry
View file @
56edcd2b
...
...
@@ -155,15 +155,21 @@ setLastUpdate cfg =
--- Prints a warning if the repository index is older than 10 days.
warnOldRepo :: Config -> IO ()
warnOldRepo cfg = do
utime <- getModificationTime (repositoryDir cfg </> "README.md")
ctime <- getClockTime
let warntime = addDays 10 utime
when (compareClockTime ctime warntime == GT) $ do
-- We assume that clock time is measured in seconds (as in PAKCS or KiCS2)
let timediff = clockTimeToInt ctime - clockTimeToInt utime
days = timediff `div` (60*60*24)
infoMessage $ "Warning: your repository index is older than " ++
show days ++ " days.\n" ++ useUpdateHelp
let updatefile = repositoryDir cfg </> "README.md"
updexists <- doesFileExist updatefile
if updexists
then do
utime <- getModificationTime updatefile
ctime <- getClockTime
let warntime = addDays 10 utime
when (compareClockTime ctime warntime == GT) $ do
-- we assume that clock time is measured in seconds
let timediff = clockTimeToInt ctime - clockTimeToInt utime
days = timediff `div` (60*60*24)
infoMessage $ "Warning: your repository index is older than " ++
show days ++ " days.\n" ++ useUpdateHelp
else infoMessage $ "Warning: your repository index is not up-to-date.\n" ++
useUpdateHelp
useUpdateHelp :: String
useUpdateHelp = "Use 'cypm update' to download the newest package index."
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment