arch-hs-0.1.0.0: A program generating PKGBUILD for hackage packages.
Copyright(c) 2020 berberman
LicenseMIT
Maintainerberberman <1793913507@qq.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Distribution.ArchHs.Utils

Description

Miscellaneous functions used crossing modules.

Synopsis

Documentation

getPkgVersion :: PackageDescription -> Version Source #

Extract the package version from PackageDescription.

toLower' :: String -> String Source #

Lower each Chars in String.

unExe :: ExeDependency -> PackageName Source #

Extract the package name from a ExeDependency.

unExeV :: ExeDependency -> (PackageName, VersionRange) Source #

Extract the package name and the version range from a ExeDependency.

fixName :: String -> String Source #

Convert the hackage name into archlinux package name follow the convention.

>>> fixName "haskell-A"
"haskell-a"
>>> fixName "QuickCheck"
"haskell-quickcheck"

getUrl :: PackageDescription -> String Source #

Extract the url from PackageDescription. It tries homepage, the head of sourceRepos, and finally fallback into hackage website.

getTwo :: Getting b s b -> s -> s -> (b, b) Source #

Apply a Getting to two values respectively, and get the result as a pair.

trace' :: MemberWithError Trace r => String -> Sem r () Source #

Trace with prefix [TRACE].