github.com/noqcks/syft@v0.0.0-20230920222752-a9e2c4e288e5/syft/pkg/cataloger/haskell/cataloger.go (about) 1 package haskell 2 3 import ( 4 "github.com/anchore/syft/syft/pkg/cataloger/generic" 5 ) 6 7 // TODO: it seems that the stack.yaml/stack.lock/cabal.project.freeze have different purposes and could have different installation intentions 8 // (some describe intent and are meant to be used by a tool to resolve more dependencies while others describe the actual installed state). 9 // This hints at splittin these into multiple catalogers, but for now we'll keep them together. 10 11 // NewHackageCataloger returns a new Haskell cataloger object. 12 func NewHackageCataloger() *generic.Cataloger { 13 return generic.NewCataloger("haskell-cataloger"). 14 WithParserByGlobs(parseStackYaml, "**/stack.yaml"). 15 WithParserByGlobs(parseStackLock, "**/stack.yaml.lock"). 16 WithParserByGlobs(parseCabalFreeze, "**/cabal.project.freeze") 17 }