implicit-hie 0.1.0.0 → 0.1.1.0
raw patch · 8 files changed
+386/−12 lines, 8 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Hie.Cabal.Parser: optSkipToNextLine :: Indent -> Parser ()
Files
- implicit-hie.cabal +8/−2
- src/Hie/Cabal/Parser.hs +16/−10
- test/Spec.hs +4/−0
- test/benchSection +20/−0
- test/cabal.project +15/−0
- test/haskell-language-server-cabal +291/−0
- test/hie.yaml.cbl +22/−0
- test/stackHie.yaml +10/−0
implicit-hie.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 18f92037a7863d121ac45e847f7dc6177adf0ebc7951dfa1588340f86e64456b+-- hash: b2b829a658e33ea328c725dea732391089d03ffd2a216d413a75d88aefa7c181 name: implicit-hie-version: 0.1.0.0+version: 0.1.1.0 description: Auto generate a stack or cabal multi component hie.yaml file category: Development, Tools, Hie, HLS synopsis: Auto generate hie-bios cradles & hie.yaml@@ -18,10 +18,16 @@ copyright: 2020 license: BSD3 license-file: LICENSE+tested-with: GHC==8.8.3 build-type: Simple extra-source-files: README.md ChangeLog.md+ test/benchSection+ test/cabal.project+ test/hie.yaml.cbl+ test/stackHie.yaml+ test/haskell-language-server-cabal source-repository head type: git
src/Hie/Cabal/Parser.hs view
@@ -6,6 +6,7 @@ import Control.Monad import Data.Attoparsec.Text import Data.Char+import Data.Functor import Data.Maybe import Data.Text (Text) import qualified Data.Text as T@@ -92,19 +93,24 @@ unqualName :: Parser Text unqualName = takeWhile1 (not . (\c -> isSpace c || c == ',')) +-- | Skip spaces and if enf of line is reached, skip it as well and require that+-- next one starts with indent.+--+-- Used for parsing fields.+optSkipToNextLine :: Indent -> Parser ()+optSkipToNextLine i = do+ skipMany $ satisfy (\c -> isSpace c && not (isEndOfLine c))+ mChar <- peekChar+ case mChar of+ Just c | isEndOfLine c ->+ char c *> indent i $> ()+ _ -> pure ()++-- | Comma or space separated list, with optional new lines. parseList :: Indent -> Parser [Text] parseList i = items <|> (emptyOrComLine >> indent i >> items) where- items = do- skipMany tabOrSpace- h <- parseString- skipMany tabOrSpace- skipMany (char ',')- t <-- items- <|> (skipToNextLine >> indent i >> parseList i)- <|> pure []- pure $ h : t+ items = sepBy parseString (optSkipToNextLine i *> skipMany (char ',') *> optSkipToNextLine i) pathMain :: Indent -> [Text] -> Text -> [Text] -> [Text] -> Parser [Text] pathMain i p m o a =
test/Spec.hs view
@@ -86,6 +86,10 @@ $ it "quoted list" $ ("\"one\"\n two\n three3" :: Text) ~> parseList 1 `shouldParse` ["one", "two", "three3"]+ describe "Should Succeed"+ $ it "list with leading commas"+ $ ("one\n , two\n , three3" :: Text) ~> parseList 1+ `shouldParse` ["one", "two", "three3"] exeSection :: Text exeSection =
+ test/benchSection view
@@ -0,0 +1,20 @@+benchmark folds+ default-language: Haskell2010+ hs-source-dirs: benchmarks+ ghc-options: -Wall -threaded++ -- GHCJS takes forever to compile dependencies+ if impl(ghcjs)+ buildable: False++ build-depends: base+ , bytestring+ , containers+ , criterion+ , lens+ , optics+ , unordered-containers+ , vector++ type: exitcode-stdio-1.0+ main-is: folds.hs
+ test/cabal.project view
@@ -0,0 +1,15 @@+packages:+ optics/*.cabal+ optics-core/*.cabal+ optics-extra/*.cabal+ optics-sop/*.cabal+ optics-th/*.cabal+ optics-vl/*.cabal+ indexed-profunctors/*.cabal+ template-haskell-optics/*.cabal++-- An example, using optics to generate optics diagrams+packages:+ metametapost/*.cabal++tests: true
+ test/haskell-language-server-cabal view
@@ -0,0 +1,291 @@+cabal-version: 2.2+category: Development+name: haskell-language-server+version: 0.1.0.0+synopsis: LSP server for GHC+description: Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>+homepage: https://github.com/haskell/haskell-language-server#readme+bug-reports: https://github.com/haskell/haskell-language-server/issues+author: Alan Zimmerman+maintainer: alan.zimm@gmail.com+copyright: Alan Zimmerman+license: Apache-2.0+license-file: LICENSE+build-type: Simple+extra-source-files:+ README.md+ ChangeLog.md++flag agpl+ Description: Enable AGPL dependencies+ Default: True+ Manual: False++flag pedantic+ Description: Enable -Werror+ Default: False+ Manual: True++source-repository head+ type: git+ location: https://github.com/haskell/haskell-language-server++common agpl+ if flag(agpl)+ cpp-options:+ -DAGPL++library+ import: agpl+ exposed-modules:+ Ide.Cradle+ Ide.Logger+ Ide.Plugin+ Ide.Plugin.Config+ Ide.Plugin.Example+ Ide.Plugin.Example2+ Ide.Plugin.GhcIde+ Ide.Plugin.Ormolu+ Ide.Plugin.Pragmas+ Ide.Plugin.Floskell+ Ide.Plugin.Formatter+ Ide.PluginUtils+ Ide.Types+ Ide.Version+ other-modules:+ Paths_haskell_language_server+ hs-source-dirs:+ src+ build-depends:+ base >=4.12 && <5+ , aeson+ , binary+ , bytestring+ , Cabal+ , cabal-helper >= 1.1+ , containers+ , data-default+ , deepseq+ , Diff+ , directory+ , extra+ , filepath+ , floskell == 0.10.*+ , ghc+ , ghcide >= 0.1+ , gitrev+ , hashable+ , haskell-lsp == 0.21.*+ , hie-bios >= 0.4+ , hslogger+ , lens+ , ormolu ^>= 0.0.5.0+ , optparse-simple+ , process+ , regex-tdfa >= 1.3.1.0+ , shake >= 0.17.5+ , text+ , transformers+ , unordered-containers+ if os(windows)+ build-depends: Win32+ else+ build-depends: unix+ if flag(agpl)+ build-depends:+ brittany+ exposed-modules:+ Ide.Plugin.Brittany++ ghc-options:+ -Wall+ -Wredundant-constraints+ -Wno-name-shadowing+ if flag(pedantic)+ ghc-options: -Werror++ default-language: Haskell2010++executable haskell-language-server+ import: agpl+ main-is: Main.hs+ hs-source-dirs:+ exe+ other-modules:+ Arguments+ Paths_haskell_language_server+ autogen-modules:+ Paths_haskell_language_server+ ghc-options:+ -threaded+ -Wall+ -Wno-name-shadowing+ -Wredundant-constraints+ -- allow user RTS overrides+ -rtsopts+ -- disable idle GC+ -- disable parallel GC+ -- increase nursery size+ "-with-rtsopts=-I0 -qg -A128M"+ if flag(pedantic)+ ghc-options: -Werror++ build-depends:+ base >=4.7 && <5+ , aeson+ , async+ , base16-bytestring+ , binary+ , bytestring+ , cryptohash-sha1+ , containers+ , data-default+ , deepseq+ , directory+ , extra+ , filepath+ --------------------------------------------------------------+ -- The MIN_GHC_API_VERSION macro relies on MIN_VERSION pragmas+ -- which require depending on ghc. So the tests need to depend+ -- on ghc if they need to use MIN_GHC_API_VERSION. Maybe a+ -- better solution can be found, but this is a quick solution+ -- which works for now.+ , ghc+ --------------------------------------------------------------+ , ghc-check ^>= 0.1+ , ghc-paths+ , ghcide+ , gitrev+ , hashable+ , haskell-lsp+ , hie-bios >= 0.4+ , haskell-language-server+ , hslogger+ , optparse-applicative+ , shake >= 0.17.5+ , text+ , time+ , unordered-containers+ default-language: Haskell2010++executable haskell-language-server-wrapper+ import: agpl+ main-is: Wrapper.hs+ hs-source-dirs:+ exe+ other-modules:+ Arguments+ Paths_haskell_language_server+ autogen-modules:+ Paths_haskell_language_server+ ghc-options:+ -threaded+ -Wall+ -Wno-name-shadowing+ -Wredundant-constraints+ -- allow user RTS overrides+ -rtsopts+ -- disable idle GC+ -- disable parallel GC+ -- increase nursery size+ "-with-rtsopts=-I0 -qg -A128M"+ if flag(pedantic)+ ghc-options: -Werror+ build-depends:+ base+ , directory+ , extra+ , filepath+ , gitrev+ , ghc+ , ghc-paths+ , hie-bios+ , haskell-language-server+ , optparse-applicative+ , process+ default-language: Haskell2010+++test-suite func-test+ import: agpl+ type: exitcode-stdio-1.0+ default-language: Haskell2010+ build-tool-depends: hspec-discover:hspec-discover+ , haskell-language-server:haskell-language-server+ , cabal-helper:cabal-helper-main+ , ghcide:ghcide-test-preprocessor++ build-depends:+ base >=4.7 && <5+ , aeson+ , data-default+ , haskell-lsp-types+ , hls-test-utils+ , hspec+ , lens+ , lsp-test >= 0.10.0.0+ , text+ , unordered-containers+ other-modules:+ -- CompletionSpec+ -- , CommandSpec+ -- , DeferredSpec+ -- , DefinitionSpec+ -- , DiagnosticsSpec+ FormatSpec+ -- , FunctionalBadProjectSpec+ -- , FunctionalCodeActionsSpec+ -- , FunctionalLiquidSpec+ , FunctionalSpec+ -- , HaReSpec+ -- , HieBiosSpec+ -- , HighlightSpec+ -- , HoverSpec+ , PluginSpec+ -- , ProgressSpec+ -- , ReferencesSpec+ -- , RenameSpec+ -- , SymbolsSpec+ -- , TypeDefinitionSpec+ , Utils+ , Paths_haskell_language_server++ hs-source-dirs:+ test/functional+ ghc-options:+ -Wall+ -Wredundant-constraints+ -Wno-name-shadowing+ -threaded -rtsopts -with-rtsopts=-N+ if flag(pedantic)+ ghc-options: -Werror+ main-is: Main.hs+ -- other-modules:+ -- Development.IDE.Test+ -- Development.IDE.Test.Runfiles++library hls-test-utils+ import: agpl+ hs-source-dirs: test/utils+ exposed-modules: TestUtils+ build-depends: base+ , haskell-language-server+ , haskell-lsp+ , hie-bios+ , aeson+ , blaze-markup+ , containers+ , data-default+ , directory+ , filepath+ , hslogger+ , hspec+ , hspec-core+ , stm+ , text+ , unordered-containers+ , yaml+ ghc-options: -Wall -Wredundant-constraints+ if flag(pedantic)+ ghc-options: -Werror+ default-language: Haskell2010
+ test/hie.yaml.cbl view
@@ -0,0 +1,22 @@+cradle:+ cabal:+ - path: "src"+ component: "lib:haskell-language-server"++ - path: "exe/Main.hs"+ component: "haskell-language-server:exe:haskell-language-server"++ - path: "exe/Arguments.hs"+ component: "haskell-language-server:exe:haskell-language-server"++ - path: "exe/Wrapper.hs"+ component: "haskell-language-server:exe:haskell-language-server-wrapper"++ - path: "exe/Arguments.hs"+ component: "haskell-language-server:exe:haskell-language-server-wrapper"++ - path: "test/functional"+ component: "haskell-language-server:test:func-test"++ - path: "test/utils"+ component: "haskell-language-server:lib:hls-test-utils"
+ test/stackHie.yaml view
@@ -0,0 +1,10 @@+cradle:+ stack:+ - path: "src"+ component: "implicit-hie:lib"++ - path: "app/Main.hs"+ component: "implicit-hie:exe:gen-hie"++ - path: "test"+ component: "implicit-hie:test:implicit-hie-test"