#3410: ghc fails to parse versioned GPL and LGPL license from package
configuration
-----------------------------+----------------------------------------------
Reporter:  int-e             |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  6.11              |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 I used this shell script to reproduce the problem:

 {{{
 #! /bin/sh

 DIR=$(mktemp -d); cd ${DIR}; trap "cd /; rm -r ${DIR}" EXIT

 echo "[]" > P
 ghc-pkg -f P register - > /dev/null <<EOF
 name: dummy-gpl
 license: GPL
 EOF
 ghc-pkg -f P register - > /dev/null <<EOF
 name: dummy-lgpl
 license: LGPL-3
 EOF
 ghc -package-conf P -e 'putStrLn "success"' || echo fail
 }}}

 which fails like this:
 {{{
 ghc-stage2: P:1:163: parse error on input `Nothing'
 fail
 }}}

 It turns out that ghc-pkg uses Cabal's code to manipulate the package
 configuration, while ghc comes with its own parser in {{{ParsePkgConf.y}}}
 - possible reasons include: historic reasons, better error messages,
 better performance.

 See also this recent thread: http://www.haskell.org/pipermail/glasgow-
 haskell-users/2009-July/017600.html

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3410>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to