Skip to content

Instantly share code, notes, and snippets.

@nghamilton
Created February 7, 2020 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nghamilton/0a2240a189f66432ea090027b27f7469 to your computer and use it in GitHub Desktop.
Save nghamilton/0a2240a189f66432ea090027b27f7469 to your computer and use it in GitHub Desktop.
Cabal file parse fail
cabal-version: 3.0
name: cabal-bug
version: 0.1.0.0
build-type: Simple
flag breaks
description: Breaks parsing main-hs.
executable cabal-bug-exe
default-language: Haskell2010
build-depends: base
-- this parses fine
if flag(breaks)
main-is: Main1.hs
else
main-is: Main2.hs
test-suite cabal-bug
default-language: Haskell2010
build-depends: base
type: exitcode-stdio-1.0
-- this fails to parse
if flag(breaks)
main-is: Main1.hs
else
main-is: Main2.hs
-- this fails to parse with the same error
-- if flag(breaks)
-- main-is: Main1.hs
-- type: exitcode-stdio-1.0
-- else
-- main-is: Main2.hs
-- type: detailed-0.9
-- this works
-- if flag(breaks)
-- main-is: Main1.hs
-- type: exitcode-stdio-1.0
-- else
-- test-module: Main2
-- type: detailed-0.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment