Skip to content

Package name not picked up #43

@sergv

Description

@sergv

TLDR if I start package name with a newline then it's not picked up

So I indented my cabal file as follows

test1.cabal

cabal-version: 3.0 name: test version: 0.1 build-type: Simple library exposed-modules: Foo hs-source-dirs: src build-depends: base >= 4.9 

and got following from parsing

> parsePackage' <$> T.readFile "/tmp/test.cabal" Right (Package "" [Comp Lib "" "src"]) 

However, if I change just one line then it parses (via Hie.Cabal.Parser) ok

test2.cabal

cabal-version: 3.0 name: test version: 0.1 build-type: Simple library exposed-modules: Foo hs-source-dirs: src build-depends: base >= 4.9 
> parsePackage' <$> T.readFile "/tmp/test2.cabal" Right (Package "test" [Comp Lib "" "src"]) 

Since cabal accepts test1.cabal, I think it should be supported. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions