Idris2Doc : Pack.Core.IO

Pack.Core.IO

(source)

Reexports

importpublic Control.Monad.Either

Definitions

mapMaybeM : Monadm=> (a-> (Maybeb `m`)) ->Lista-> (Listb `m`)
Totality: total
Visibility: export
filterM : Monadm=> (a-> (Bool `m`)) ->Lista-> (Lista `m`)
Totality: total
Visibility: export
ignoreError : Monadm=>EitherTerrm () -> (() `m`)
Totality: total
Visibility: export
eitherIO : HasIOio=> (err->PackErr) ->io (Eithererra) ->EitherTPackErrioa
  Convert an IO action with the potential of failure
to an `EitherT PackErr`.

Totality: total
Visibility: export
finally : Monadm=>EitherTerrm () ->EitherTerrma->EitherTerrma
  Make sure a *cleanup* action is run after
an IO action that might fail.

Totality: total
Visibility: export
run : EitherTPackErrIO () ->IO ()
  Runs a *pack* program, printing errors to standard out.

Totality: total
Visibility: export
dispEnv : ListEnvVar->String
  Display a list of variable-value pairs in the format
`VAR1="val1" VAR2="val2"`.

Totality: total
Visibility: export
sys : HasIOio=>CmdArgList->EitherTPackErrio ()
  Tries to run a system command.

Totality: total
Visibility: export
sysAndLog : HasIOio=>Env=>LogLevel->CmdArgList->EitherTPackErrio ()
  Tries to run a system command while logging its output.

Visibility: export
sysWithEnv : HasIOio=>CmdArgList->ListEnvVar->EitherTPackErrio ()
  Tries to run a system command prefixed with the given
environment variables.

Note: In case of an error, the environment will not be part
of the command listed in the error message. This is a
deliberate choice to declutter Idris output in case of a
failed build. If the environment should be included in the
error message, just prefix `cmd` accordingly and use `sys`.

Totality: total
Visibility: export
sysWithEnvAndLog : HasIOio=>Env=>LogLevel->CmdArgList->ListEnvVar->EitherTPackErrio ()
Visibility: export
sysRun : HasIOio=>CmdArgList->EitherTPackErrioString
  Tries to run a system command returning its output.

Visibility: export
sysRunWithEnv : HasIOio=>CmdArgList->ListEnvVar->EitherTPackErrioString
  Tries to run a system command prefixed with the given
environment variables returning its output.

Note: In case of an error, the environment will not be part
of the command listed in the error message. This is a
deliberate choice to declutter Idris output in case of a
failed build. If the environment should be included in the
error message, just prefix `cmd` accordingly and use `sys`.

Visibility: export
exists : HasIOio=>PathAbs->ioBool
  Checks if a file at the given location exists.

Totality: total
Visibility: export
fileExists : HasIOio=>FileAbs->ioBool
  Checks if a file at the given location exists.

Totality: total
Visibility: export
missing : HasIOio=>PathAbs->ioBool
  Checks if a file at the given location is missing.

Totality: total
Visibility: export
fileMissing : HasIOio=>FileAbs->ioBool
  Checks if a file at the given location is missing.

Totality: total
Visibility: export
mkDir : HasIOio=>PathAbs->EitherTPackErrio ()
  Tries to create a director (including parent directories)

Totality: total
Visibility: export
mkParentDir : HasIOio=>PathAbs->EitherTPackErrio ()
  Creates a parent directory of a (file) path

Totality: total
Visibility: export
rmDir : HasIOio=>PathAbs->EitherTPackErrio ()
  Forcefully deletes a directory with all its content

Totality: total
Visibility: export
curDir : HasIOio=>EitherTPackErrio (PathAbs)
  Returns the current directory's path.

Totality: total
Visibility: export
chgDir : HasIOio=>PathAbs->EitherTPackErrio ()
  Changes the working directory

Totality: total
Visibility: export
inDir : HasIOio=>PathAbs-> (PathAbs->EitherTPackErrioa) ->EitherTPackErrioa
  Runs an action in the given directory, changing back
to the current directory afterwards.

Totality: total
Visibility: export
entries : HasIOio=>PathAbs->EitherTPackErrio (ListBody)
  Returns the names of entries in a directory

Totality: total
Visibility: export
tomlFiles : HasIOio=>PathAbs->EitherTPackErrio (ListBody)
  Returns the names of toml files in a directory

Totality: total
Visibility: export
htmlFiles : HasIOio=>PathAbs->EitherTPackErrio (ListBody)
  Returns the names of toml files in a directory

Totality: total
Visibility: export
currentEntries : HasIOio=>EitherTPackErrio (ListBody)
  Returns the names of entries in the current directory

Totality: total
Visibility: export
copyDir : HasIOio=>PathAbs->PathAbs->EitherTPackErrio ()
  Copy a directory.

Totality: total
Visibility: export
copyDirInto : HasIOio=>PathAbs->PathAbs->EitherTPackErrio ()
  Copy a whole directory into the given parent directory.

Totality: total
Visibility: export
findInParentDirs : HasIOio=> (Body->Bool) ->PathAbs->EitherTPackErrio (Maybe (FileAbs))
  Tries to find the first file, the body of which returns `True` for
the given predicate.

Totality: total
Visibility: export
findInAllParentDirs : HasIOio=> (Body->Bool) ->PathAbs->EitherTPackErrio (List (FileAbs))
  Tries to find the first file, the body of which return `True` for
the given predicate, in each parent directory.

Totality: total
Visibility: export
withTmpDir : HasIOio=>PackDirs=> (TmpDir=>EitherTPackErrioa) ->EitherTPackErrioa
Totality: total
Visibility: export
rmFile : HasIOio=>FileAbs->EitherTPackErrio ()
  Delete a file.

Totality: total
Visibility: export
read : HasIOio=>FileAbs->EitherTPackErrioString
  Tries to read the content of a file

Visibility: export
readIfExists : HasIOio=>FileAbs->String->EitherTPackErrioString
  Reads the content of a file if it exists, otherwise
returns the given alternative string.

Visibility: export
write : HasIOio=>FileAbs->String->EitherTPackErrio ()
  Tries to write a string to a file.
The file's parent directory is created if
it does not yet exist.

Visibility: export
  Creates a symbolic link from one path to another,
remove a link at path `to` if there already is one.

Totality: total
Visibility: export
copyFile : HasIOio=>FileAbs->FileAbs->EitherTPackErrio ()
  Copy a file.

Totality: total
Visibility: export
patch : HasIOio=>FileAbs->FileAbs->EitherTPackErrio ()
  Patch a file

Totality: total
Visibility: export