@@ -26,7 +26,9 @@ nixExpr2CabalExpr (Expr _ _ dict) =
2626 buildTools = [ Dependency (PackageName dep) anyVersion | dep <- getRefList "buildTools" dict ]
2727 extraLibs = getRefList "extraLibraries" dict
2828 pkgconfDeps = getRefList "pkgconfDepends" dict
29− platforms = [getRef "platforms" (getDict "meta" dict)]
29+ platform = getRef "platforms" (getDict "meta" dict)
30+ platforms = if null platform then [] else [platform]
31+ noHaddock = getBool "noHaddock" dict
3032 maintainers = getRefList "maintainers" (getDict "meta" dict)
3133
3234get' :: String -> Dictionary -> [Value]
@@ -41,6 +43,7 @@ getBool :: String -> Dictionary -> Bool
4143getBool ref dict
4244 | [] <- get' ref dict = False
4345 | BoolV b <- get ref dict = if b == Yes then True else False
46+ | otherwise = error $ "getBool: unexpected value of " ++ show ref ++ " in " ++ show dict
4447
4548getString :: String -> Dictionary -> String
4649getString ref dict
@@ -70,6 +73,7 @@ getRef :: String -> Dictionary -> String
7073getRef ref dict
7174 | [] <- get' ref dict = ""
7275 | AttributeV r <- get ref dict = flattenReference r
76+ | otherwise = error $ "getURL: unexpected value of " ++ show ref ++ " in " ++ show dict
7377
7478flattenReference :: Reference -> String
7579flattenReference (Reference rs) = concat (intersperse "." [ r | Ident r <- rs ])