%%
pkgconf :: { [ PackageConfig ] }
- : '[' pkgs ']' { reverse $2 }
+ : '[' ']' { [] }
+ | '[' pkgs ']' { reverse $2 }
pkgs :: { [ PackageConfig ] }
: pkg { [ $1 ] }
"extra_ghc_opts" -> p{extra_ghc_opts = $3}
"extra_cc_opts" -> p{extra_cc_opts = $3}
"extra_ld_opts" -> p{extra_ld_opts = $3}
+ "framework_dirs" -> p{framework_dirs = $3}
+ "extra_frameworks"-> p{extra_frameworks= $3}
_other -> p
}
loadPackageConfig :: FilePath -> IO [PackageConfig]
loadPackageConfig conf_filename = do
- buf <- hGetStringBuffer False conf_filename
- case parse buf PState{ bol = 0#, atbol = 1#,
- context = [], glasgow_exts = 0#,
- loc = mkSrcLoc (_PK_ conf_filename) 1 } of
+ buf <- hGetStringBuffer conf_filename
+ let loc = mkSrcLoc (mkFastString conf_filename) 1
+ exts = ExtFlags {glasgowExtsEF = False,
+ ffiEF = False,
+ withEF = False,
+ parrEF = False}
+ case parse buf (mkPState loc exts) of
PFailed err -> do
freeStringBuffer buf
throwDyn (InstallationError (showSDoc err))