cabal-fix-0.0.0.2: Fix for cabal files.
Safe HaskellSafe-Inferred
LanguageGHC2021

CabalFix.Archive

Description

Archive investigation

Synopsis

Documentation

cabalIndex :: IO FilePath Source #

the cabal index

cabalEntries :: IO [Entry] Source #

all the tar entries that represent packages of some kind.

data FileName Source #

The naming convention in 01-index.tar

Instances

Instances details
Generic FileName Source # 
Instance details

Defined in CabalFix.Archive

Associated Types

type Rep FileName :: Type -> Type #

Methods

from :: FileName -> Rep FileName x #

to :: Rep FileName x -> FileName #

Show FileName Source # 
Instance details

Defined in CabalFix.Archive

Eq FileName Source # 
Instance details

Defined in CabalFix.Archive

Ord FileName Source # 
Instance details

Defined in CabalFix.Archive

type Rep FileName Source # 
Instance details

Defined in CabalFix.Archive

type Rep FileName = D1 ('MetaData "FileName" "CabalFix.Archive" "cabal-fix-0.0.0.2-GueGPKFkv7p1skPCP5Ed4H" 'False) (C1 ('MetaCons "FileName" 'PrefixI 'True) (S1 ('MetaSel ('Just "nameFN") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString) :*: (S1 ('MetaSel ('Just "versionFN") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString) :*: S1 ('MetaSel ('Just "filenameFN") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))))

filename :: ByteString -> FileName Source #

Convert a ByteString to a FileName. Errors on failure.

filenameP :: Parser e FileName Source #

FileName parser

cabals :: IO [(FileName, ByteString)] Source #

cabal files

Discards stale versions with later revisions

latestCabals :: IO (Map ByteString (Version, ByteString)) Source #

Assumes cabal entries are in chronological order and that the last version encountered is the latest valid one.

libDeps :: CabalFields -> [Dep] Source #

extract library build-deps from a Field list, also looking in common stanzas

allDepGraph :: Map ByteString CabalFields -> Graph ByteString Source #

Graph of all valid dependencies

count_ :: Ord a => [a] -> Map a Int Source #

count distinct elements of a list.

collect_ :: Ord k => [(k, v)] -> Map k [v] Source #

collect distinct monoidal values

upstreams :: ByteString -> Graph ByteString -> Set ByteString Source #

Get the set of upstream projects

downstreams :: ByteString -> Graph ByteString -> Set ByteString Source #

Get the set of downstream projects.

upstreamG :: ByteString -> Graph ByteString -> Graph ByteString Source #

Get the upstream graph of a library. text, for example:

dotUpstream :: Graph ByteString -> ByteString Source #

Create a dot graph from an algebraic graph of dependencies

dotUpstreamSvg :: Graph ByteString -> FilePath -> IO ByteString Source #

make an svg file of a dependency graph