[Hackage] #493: counterintuitive syntax of .cabal/config file

#493: counterintuitive syntax of .cabal/config file ---------------------------------+------------------------------------------ Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.6.0.1 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ I wanted to change the default so that profiling libraries were always built. So I edited the ~/.cabal/config file as follows: OLD: {{{ -- library-vanilla: True -- library-profiling: False -- shared: False }}} NEW: {{{ -- library-vanilla: True library-profiling: True -- shared: False }}} I assumed that the --'s were Haskell comment syntax and indicated defaults, and that by removing them I could change an option. This didn't work. After a while I discovered that I had to do it this way: NEW, Version 2: {{{ -- library-vanilla: True library-profiling: True -- shared: False }}} This time it worked. But this wouldn't have been my first guess from looking at the config file, and I didn't find anywhere to look for documentation on the config file's format. (It would be helpful if this were available as an option in 'cabal help'. Maybe it is, and I didn't see it?) cabal-install version 0.6.0 using version 1.6.0.1 of the Cabal library -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/493 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#493: counterintuitive syntax of .cabal/config file ---------------------------------+------------------------------------------ Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.6.0.1 Severity: normal | Resolution: Keywords: | Difficulty: unknown Ghcversion: | Platform: ---------------------------------+------------------------------------------ Comment (by duncan): Right, `--` is a comment, but like `.cabal` files, the syntax uses layout, so indentation is significant. Indentation is used to indicate nested sections. Would having an explanation at the top be enough? We can say that `--` lines are comments, that indentation is significant and that the commented out fields give default values, if any. We may also be able to get the parser to produce more helpful messages in some cases. However in general there can be fields that have multi-line nested content. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/493#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#493: counterintuitive syntax of .cabal/config file
---------------------------------+------------------------------------------
Reporter: guest | Owner:
Type: defect | Status: closed
Priority: normal | Milestone:
Component: cabal-install tool | Version: 1.6.0.1
Severity: normal | Resolution: fixed
Keywords: | Difficulty: unknown
Ghcversion: | Platform:
---------------------------------+------------------------------------------
Changes (by duncan):
* status: new => closed
* resolution: => fixed
Comment:
{{{
Sun Feb 15 19:08:17 GMT 2009 Duncan Coutts
participants (1)
-
Hackage