inputItem :: [String] -> (TargetId, Target)
inputItem (i:url:pkg:modu:typ:self:docs) =
    (read i
    ,Target (if url == "." then "" else url) (f pkg) (f modu) (if typ == "." then "" else typ) self (unlines docs))
    where
        f "." = Nothing
        f x = Just (word1 x)
inputItem :: [String] -> (TargetId, Target)
inputItem (i:url:pkg:modu:typ:self:docs) =
    (read i
    ,Target (if url == "." then "" else url) (f pkg) (f modu) (if typ == "." then "" else typ) self (unlines docs))
    where
        f "." = Nothing
        f x = Just (word1 x)
inputItem (i:url:pkg:modu:typ:self:docs) =
    (read i
    ,Target (if url == "." then "" else url) (f pkg) (f modu) (if typ == "." then "" else typ) self (unlines docs))
    where
        f "." = Nothing
        f x = Just (word1 x)