Federico Beffa <be...@ieee.org> skribis: > On Thu, Mar 26, 2015 at 2:09 PM, Ludovic Courtès <l...@gnu.org> wrote: >> Could you post the actual backtrace you get (?) when running the program >> with LC_ALL=C? > > I doesn't backtrace, the function just gives the wrong result.
Hmm, OK. Still sounds like an encoding error. >>>> I would expect the conversion of conditional expressions to sexps to be >>>> done in the parsing phase above, such that ‘read-cabal’ returns an >>>> object with some sort of an AST for those conditionals. >>>> >>>> Then this part would focus on the evaluation of those conditionals, >>>> like: >>>> >>>> ;; Evaluate the conditionals in CABAL according to FLAGS. Return an >>>> ;; evaluated Cabal object. >>>> (eval-cabal cabal flags) >>>> >>>> WDYT? > > I'm not sure this can be done, because flags must be declared in the > cabal file itself and the manual is not clear if the flags are > required to be declared before they are used or not (although it would > make sense). By ‘flags’ I actually meant things like ‘unix’, which appear in conditionals: (eval-cabal cabal '(unix)) > To see how this importer (and the haskell-build-system that I've > posted) performs I've now used it with several libraries (for the > moment I've packaged 26 libraries). While it runs nicely with most of > them, a couple posed problems resulting in package definitions with > some fields empty and 1 caused a backtrace. (Once I fixed the package > manually, the build-system worked fine for all of them.) > > Before working further on improving the interface, I want first to > understand what are the root causes of the errors (especially the one > causing the backtrace) and fix them. Sounds good, thanks! Ludo’.