@@ -37,7 +37,7 @@ rebuildFile path = do
38 m <- case map snd <$> P.parseModulesFromFiles id [(path, input)] of
38 m <- case map snd <$> P.parseModulesFromFiles id [(path, input)] of
39 Left parseError ->
39 Left parseError ->
40− throwError . GeneralError $ P.prettyPrintMultipleErrors False parseError
40+ throwError . RebuildError . toJSONErrors False P.Error $ parseError
41 Right [m] -> pure m
41 Right [m] -> pure m
42 Right _ -> throwError . GeneralError $ "Please define exactly one module."
42 Right _ -> throwError . GeneralError $ "Please define exactly one module."