Ticket #118 (closed defect: fixed)
Cabal eats leading '.'s from .cabal file
| Reported by: | igloo@… | Owned by: | ijones |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | Cabal library | Version: | 1.1.6 |
| Severity: | normal | Keywords: | |
| Cc: | Difficulty: | normal | |
| GHC Version: | 6.6 | Platform: | Linux |
Description
In this cabal file:
name: foo
version: 1
exposed-modules: Foo
build-depends: base
include-dirs:
../includes
Cabal is eating the leading . resulting in -I./includes:
$ ./Setup build -v Preprocessing library foo-1... Building foo-1... /usr/bin/ghc -package-name foo-1 --make -hide-all-packages -i -idist/build/autogen -i. -I./includes -odir dist/build -hidir dist/build -package base-2.0 Foo /usr/bin/ar q dist/build/libHSfoo-1.a dist/build/Foo.o /usr/bin/ar: creating dist/build/libHSfoo-1.a /usr/bin/ld -r -x -o dist/build/HSfoo-1.o.tmp dist/build/Foo.o
I think this is so you can give a description like
Paragraph 1 . Paragraph 2
with the '.' being removed, but it is being applied too liberally. I would also expect a '.' to be removed only if it is the only (non-white) character on a line.
The relevant code is
merge :: [(a, [Char])] -> [(a, [Char])]
merge ((n,x):(_,c:s):ys)
| c == ' ' || c == '\t' = case dropWhile isSpace s of
('.':s') -> merge ((n,x++"\n"++s'):ys)
s' -> merge ((n,x++"\n"++s'):ys)
merge ((n,x):ys) = (n,x) : merge ys
merge [] = []
in ParseUtils.hs, called from readFields.
Change History
Note: See
TracTickets for help on using
tickets.
