parseInf :: HasInfo i => i -> (FilePath,Int)
parseInf inf = case getInfo inf of
  Info (Just (_,Parsed (Directed fn l _ _ _) _)) -> (T.unpack $ decodeUtf8 fn,succ $ fromIntegral l)
  Info (Just (_,Parsed (Lines l _ _ _) _)) -> nofile $ succ $ fromIntegral l
  _ -> nofile 0
  where nofile l = ("<interactive>",l)
parseInf :: HasInfo i => i -> (FilePath,Int)
parseInf inf = case getInfo inf of
  Info (Just (_,Parsed (Directed fn l _ _ _) _)) -> (T.unpack $ decodeUtf8 fn,succ $ fromIntegral l)
  Info (Just (_,Parsed (Lines l _ _ _) _)) -> nofile $ succ $ fromIntegral l
  _ -> nofile 0
  where nofile l = ("<interactive>",l)
parseInf inf = case getInfo inf of
  Info (Just (_,Parsed (Directed fn l _ _ _) _)) -> (T.unpack $ decodeUtf8 fn,succ $ fromIntegral l)
  Info (Just (_,Parsed (Lines l _ _ _) _)) -> nofile $ succ $ fromIntegral l
  _ -> nofile 0
  where nofile l = ("<interactive>",l)