ucsd-progsys/liquidhaskell — pull request #161 by gridaphobe (2013-12-05 22:59:06+00:00)
Title: Improve error messages from failed lookupGhcThing call

This branch makes `lookupGhcThing` throw a proper error, i.e. using `CRASH` with a source location, instead of just dieing with `errorstar`.

I'm not super happy with the way the code turned out, the `Located` values are strewn all over the place. The benefit is that the error locations are very precise, but at the cost of better readability. I have half a mind to scrap this branch and just output the location of the whole offending specification, e.g.

```
CRASH: GHC Error: foo.hs:5:1
Unknown TyCon Foo in
foo :: a -> {v:Foo | bar}
```

This would require more work on the part of the user, but I think not a huge amount.. Anyway, I'm submitting this for discussion first, it depends on my `err-unbound` branch in fixpoint if you want to test the code.