#!/bin/bash
set -x
set -e
set -o pipefail
scripts=/mit/ghc/src/random
cat - | perl $scripts/classify-ghc-errors-with-description2.pl |perl -plwe 's/^[0-9.]+://' | grep -v '^ Synopsis: ' | grep -v '^ Description: ' | grep -v '^  \+ make_snapshot' | grep -v 'true ROOT FAILURE' | grep -v '^  Completed ' | grep -v 'INFO previous dependency did not install' | grep -v '^  ERROR multiples'  | perl $scripts/inline-cdot.pl | perl -plwe 'if(/^(\s+Not in scope: )(.*)(‘.*\.([^\.]+)’)/){$_="$1$2‘$4’ ($3)"}' | perl -plwe 'if (/Could not deduce/){s/Could not deduce/No instance for/;$_.=" (Could not deduce)"}' | perl -plwe 'if (/(.*?)(\S+): (No such file or directory.*)/){$_="$1$3: $2"}' | sort
