idris-1.3.4: Functional Programming Language with Dependent Types

License | BSD3
Maintainer | The Idris Community.
Safe Haskell | Safe-Inferred
Language | Haskell2010

Idris.Package

Contents

- read the package description
- check all the library dependencies exist
- invoke the makefile if there is one
- invoke idris on each module, with idris_opts
- install everything into datadir/pname, if install flag is set

Description

Synopsis

- getPkgDesc :: FilePath -> IO PkgDesc
- buildPkg :: [Opt] -> Bool -> (Bool, FilePath) -> IO ()
- checkPkg :: [Opt] -> Bool -> Bool -> FilePath -> IO ()
- replPkg :: [Opt] -> FilePath -> Idris ()
- cleanPkg :: [Opt] -> FilePath -> IO ()
- documentPkg :: [Opt] -> (Bool, FilePath) -> IO ()
- testPkg :: [Opt] -> FilePath -> IO ExitCode
- installPkg :: [String] -> PkgDesc -> IO ()
- auditPackage :: Bool -> PkgDesc -> IO ()
- buildMods :: [Opt] -> [Name] -> IO (Maybe IState)
- testLib :: Bool -> PkgName -> String -> IO Bool
- rmIBC :: Name -> IO ()
- rmIdx :: PkgName -> IO ()
- rmExe :: String -> IO ()
- toIBCFile :: Name -> [Char]
- installIBC :: String -> PkgName -> Name -> IO ()
- installIdx :: String -> PkgName -> IO ()
- installObj :: String -> PkgName -> String -> IO ()
- mkDirCmd :: String
- inPkgDir :: PkgDesc -> IO a -> IO a
- makeTarget :: Maybe String -> Maybe String -> IO ()
- make :: Maybe String -> IO ()
- clean :: Maybe String -> IO ()
- mergeOptions :: [Opt] -> [Opt] -> Either String [Opt]

# read the package description

# check all the library dependencies exist

# invoke the makefile if there is one

# invoke idris on each module, with idris_opts

# install everything into datadir/pname, if install flag is set

getPkgDesc :: FilePath -> IO PkgDesc #

buildPkg #

Arguments

:: [Opt] | Command line options
-> Bool | Provide Warnings
-> (Bool, FilePath) | (Should we install, Location of iPKG file)
-> IO () |

Run the package through the idris compiler.

checkPkg #

Arguments

:: [Opt] | Command line Options
-> Bool | Show Warnings
-> Bool | quit on failure
-> FilePath | Path to ipkg file.
-> IO () |

Type check packages only

This differs from build in that executables are not built, if the package contains an executable.

replPkg #

Arguments

:: [Opt] | Command line Options
-> FilePath | Path to ipkg file.
-> Idris () |

Check a package and start a REPL.

This function only works with packages that have a main module.

cleanPkg #

Arguments

:: [Opt] | Command line options.
-> FilePath | Path to ipkg file.
-> IO () |

Clean Package build files

documentPkg #

Arguments

:: [Opt] | Command line options.
-> (Bool, FilePath) | (Should we install?, Path to ipkg file).
-> IO () |

Generate IdrisDoc for package TODO: Handle case where module does not contain a matching namespace E.g. from prelude.ipkg: IO, Prelude.Chars, Builtins

Issue number #1572 on the issue tracker https://github.com/idris-lang/Idris-dev/issues/1572

testPkg #

Arguments

:: [Opt] | Command line options.
-> FilePath | Path to ipkg file.
-> IO ExitCode |

Build a package with a sythesized main function that runs the tests

installPkg #

Arguments

:: [String] | Alternate install location
-> PkgDesc | iPKG file.
-> IO () |

Install package

auditPackage :: Bool -> PkgDesc -> IO () #

buildMods :: [Opt] -> [Name] -> IO (Maybe IState) #

testLib :: Bool -> PkgName -> String -> IO Bool #

rmIBC :: Name -> IO () #

rmIdx :: PkgName -> IO () #

rmExe :: String -> IO () #

toIBCFile :: Name -> [Char] #

installIBC :: String -> PkgName -> Name -> IO () #

installIdx :: String -> PkgName -> IO () #

installObj :: String -> PkgName -> String -> IO () #

mkDirCmd :: String #

inPkgDir :: PkgDesc -> IO a -> IO a #

makeTarget :: Maybe String -> Maybe String -> IO () #

Invoke a Makefile's target with an enriched system environment

make :: Maybe String -> IO () #

Invoke a Makefile's default target.

clean :: Maybe String -> IO () #

Invoke a Makefile's clean target.

mergeOptions #

Arguments

:: [Opt] | The command line options
-> [Opt] | The package options
-> Either String [Opt] |

Merge an option list representing the command line options into those specified for a package description.

This is not a complete union between the two options sets. First, to prevent important package specified options from being overwritten. Second, the semantics for this merge are not fully defined.

A discussion for this is on the issue tracker: https://github.com/idris-lang/Idris-dev/issues/1448