GHC 7.8 chokes on recursive classes
Type checking this makes GHC 7.8.3 loop:
```hs
{-# LANGUAGE MultiParamTypeClasses #-}
module Foo where
class Class3 a => Class1 a where
class Class2 t a where
class2 :: (Class3 t) => a -> m
class (Class1 t, Class2 t t) => Class3 t where
```
Does not happen in 7.6.3.
I think it's something to do with the `Class3` constraint appearing in `class2`.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 7.8.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHC 7.8 chokes on recursive classes","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.8.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Type checking this makes GHC 7.8.3 loop:\r\n\r\n{{{#!hs\r\n{-# LANGUAGE MultiParamTypeClasses #-}\r\nmodule Foo where\r\n\r\nclass Class3 a => Class1 a where\r\n\r\nclass Class2 t a where\r\n class2 :: (Class3 t) => a -> m\r\n\r\nclass (Class1 t, Class2 t t) => Class3 t where\r\n}}}\r\n\r\nDoes not happen in 7.6.3.\r\n\r\nI think it's something to do with the `Class3` constraint appearing in `class2`.","type_of_failure":"OtherFailure","blocking":[]} -->
issue