diagnosticsJSON :: Language -> FilePath -> Erring Pair
diagnosticsJSON (Language _ _ _ lr pr) p = do
        src <- liftIO $ BS.readFile p
        tokens <- lr p src
        nodes <- pr p src
        return $ T.pack p .= object [ "tokens" .= toJSON tokens
                                    , "nodes" .= toJSON nodes
                                    ]
diagnosticsJSON :: Language -> FilePath -> Erring Pair
diagnosticsJSON (Language _ _ _ lr pr) p = do
        src <- liftIO $ BS.readFile p
        tokens <- lr p src
        nodes <- pr p src
        return $ T.pack p .= object [ "tokens" .= toJSON tokens
                                    , "nodes" .= toJSON nodes
                                    ]
diagnosticsJSON (Language _ _ _ lr pr) p = do
        src <- liftIO $ BS.readFile p
        tokens <- lr p src
        nodes <- pr p src
        return $ T.pack p .= object [ "tokens" .= toJSON tokens
                                    , "nodes" .= toJSON nodes
                                    ]