parsePkgInfo :: String -> Maybe PackageIdentifier
parsePkgInfo str | "builtin_" `isPrefixOf` str =
                     let name = drop (length "builtin_") str -- ghc-pkg doesn't like builtin_ prefix
                     in Just $ PackageIdentifier (PackageName name) $ Version [] []
                 | otherwise = parseCheck str
parsePkgInfo :: String -> Maybe PackageIdentifier
parsePkgInfo str | "builtin_" `isPrefixOf` str =
                     let name = drop (length "builtin_") str -- ghc-pkg doesn't like builtin_ prefix
                     in Just $ PackageIdentifier (PackageName name) $ Version [] []
                 | otherwise = parseCheck str
parsePkgInfo str | "builtin_" `isPrefixOf` str =
                     let name = drop (length "builtin_") str -- ghc-pkg doesn't like builtin_ prefix
                     in Just $ PackageIdentifier (PackageName name) $ Version [] []
                 | otherwise = parseCheck str