File tree Expand file tree Collapse file tree 7 files changed +36
-1
lines changed
Cabal-syntax/src/Language/Haskell
cabal-testsuite/PackageTests/Regression/T8507 Expand file tree Collapse file tree 7 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ instance Pretty Language where
77
77
pretty other = Disp. text (show other)
78
78
79
79
instance Parsec Language where
80
- parsec = classifyLanguage <$> P. some P. anyChar
80
+ parsec = classifyLanguage <$> P. munch1 isAlphaNum
81
81
82
82
classifyLanguage :: String -> Language
83
83
classifyLanguage = \ str -> case lookup str langTable of
Original file line number Diff line number Diff line change
1
+ module Foo where
2
+
3
+ foo :: a
4
+ foo = undefined
Original file line number Diff line number Diff line change
1
+ # cabal v2-build
2
+ Resolving dependencies...
3
+ Build profile: -w ghc-<GHCVER> -O1
4
+ In order, the following will be built:
5
+ - pkg-0 (lib) (first run)
6
+ Configuring library for pkg-0..
7
+ Preprocessing library for pkg-0..
8
+ Building library for pkg-0..
Original file line number Diff line number Diff line change
1
+ packages :
2
+ ./
Original file line number Diff line number Diff line change
1
+ import Test.Cabal.Prelude
2
+
3
+ -- Issue #8507: trailing space in `default-language` should not make
4
+ -- `cabal build` complain.
5
+ main = cabalTest $ cabal " v2-build" [" all" ]
6
+
Original file line number Diff line number Diff line change
1
+ cabal-version : 3.0
2
+ name : pkg
3
+ synopsis : synopsis
4
+ description : description
5
+ version : 0
6
+ category : example
7
+
8
+ license : GPL-3.0-or-later
9
+
10
+ library
11
+ exposed-modules : Foo,
12
+ build-depends : base == 4. *
13
+ default-language : Haskell2010
14
+ -- Note whitespace after “Haskell 2010”.
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ excluded-files:
92
92
- Cabal-syntax/src/Distribution/Fields/Lexer.hs
93
93
- Cabal-tests/tests/ParserTests/warnings/tab.cabal
94
94
- Cabal-tests/tests/ParserTests/warnings/utf8.cabal
95
+ - cabal-testsuite/PackageTests/Regression/T8507/pkg.cabal
95
96
96
97
# These also contain tabs that affect the golden value:
97
98
# Could be removed from exceptions, but then the tab warning
You can’t perform that action at this time.
0 commit comments