summaryrefslogtreecommitdiff
path: root/compiler/main/ParsePkgConf.y
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-06-26 20:27:49 +0000
committerIan Lynagh <igloo@earth.li>2008-06-26 20:27:49 +0000
commita11bb49b97eaba892730baf1565e922715dbc07f (patch)
treeb9ebdf37ef6329cd8c836aec5a2aca78b55ba70a /compiler/main/ParsePkgConf.y
parentabd113f06ebf3ac29f852e80c5a8c0060f979202 (diff)
downloadhaskell-a11bb49b97eaba892730baf1565e922715dbc07f.tar.gz
Follow Cabal changes
Diffstat (limited to 'compiler/main/ParsePkgConf.y')
-rw-r--r--compiler/main/ParsePkgConf.y13
1 files changed, 10 insertions, 3 deletions
diff --git a/compiler/main/ParsePkgConf.y b/compiler/main/ParsePkgConf.y
index ac0cebbf64..ea515dbc47 100644
--- a/compiler/main/ParsePkgConf.y
+++ b/compiler/main/ParsePkgConf.y
@@ -10,6 +10,7 @@ module ParsePkgConf( loadPackageConfig ) where
#include "HsVersions.h"
+import Distribution.Package hiding ( depends )
import PackageConfig
import Lexer
import Module
@@ -112,9 +113,15 @@ field :: { PackageConfig -> PackageConfig }
}
pkgid :: { PackageIdentifier }
- : CONID '{' VARID '=' STRING ',' VARID '=' version '}'
- { PackageIdentifier{ pkgName = unpackFS $5,
- pkgVersion = $9 } }
+ : CONID '{' VARID '=' CONID STRING ',' VARID '=' version '}'
+ {% case unpackFS $5 of
+ "PackageName" ->
+ return $ PackageIdentifier {
+ pkgName = PackageName (unpackFS $6),
+ pkgVersion = $10
+ }
+ _ -> happyError
+ }
version :: { Version }
: CONID '{' VARID '=' intlist ',' VARID '=' strlist '}'