packages feed

implicit-hie 0.1.2.5 → 0.1.2.6

raw patch · 3 files changed

+25/−2 lines, 3 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ Hie.Cabal.Parser: skipFreeformField :: Parser ()

Files

README.md view
@@ -1,6 +1,7 @@ # implicit-hie ```bash cd your-stack-or-cabal-package+stack install implicit-hie # or cabal install implicit-hie gen-hie > hie.yaml ``` `gen-hie` should be run the root of a cabal or stack project.@@ -65,5 +66,4 @@ - [ ] common stanzas  ### Work, Twitter-- I'm currently looking for work as a Haskell or Rust developer. I can be reached via email or a twitter message. - Follow me on twitter [@AviDessauer](https://twitter.com/AviDessauer).
implicit-hie.cabal view
@@ -7,7 +7,7 @@ -- hash: b2b829a658e33ea328c725dea732391089d03ffd2a216d413a75d88aefa7c181  name:               implicit-hie-version:            0.1.2.5+version:            0.1.2.6 description:   Auto generate a stack or cabal multi component hie.yaml file 
src/Hie/Cabal/Parser.hs view
@@ -32,6 +32,28 @@ parsePackage' :: Text -> Either String Package parsePackage' = parseOnly parsePackage +-- Skip over entire fields that are known to be free-form.  Ensures lines that+-- look like the beginning of sections/stanzas are not inadvertently intepreted+-- as such.+-- List gathered by searching "free text field" in:+-- https://cabal.readthedocs.io/en/3.4/buildinfo-fields-reference.html+-- May be subject to change across Cabal versions.+skipFreeformField :: Parser ()+skipFreeformField =+  choice $+    flip (field 0) skipBlock+      <$> [ "author",+            "bug-reports",+            "category",+            "copyright",+            "description",+            "homepage",+            "maintainer",+            "package-url",+            "stability",+            "synopsis"+          ]+ parsePackage :: Parser Package parsePackage =   ( do@@ -39,6 +61,7 @@       (Package _ t) <- parsePackage       pure $ Package n t   )+    <|> (skipFreeformField >> parsePackage)     <|> ( do             h <- parseComponent 0             (Package n t) <- parsePackage