From c99941cfeee033fca2df45e9523b65c83be20d31 Mon Sep 17 00:00:00 2001
From: Richard Eisenberg <eir@cis.upenn.edu>
Date: Sat, 22 Mar 2014 13:13:26 -0400
Subject: [PATCH] Fix #8917.

FamInstEnv.normaliseTcApp should normalise arguments even when
the top-level tycon isn't a type family. This was a regression
from 7.6 -- not sure when it happened, but it was probably my
fault. Fixed now, in any case.
---
 compiler/types/FamInstEnv.lhs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/types/FamInstEnv.lhs b/compiler/types/FamInstEnv.lhs
index 0421f48a58b..50ced7d323e 100644
--- a/compiler/types/FamInstEnv.lhs
+++ b/compiler/types/FamInstEnv.lhs
@@ -959,9 +959,9 @@ normaliseTcApp env role tc tys
 
   | otherwise   -- No unique matching family instance exists;
                 -- we do not do anything
-  = (Refl role ty, ty)
-  where
-    ty = mkTyConApp tc tys
+  = let (co, ntys) = normaliseTcArgs env role tc tys in
+    (co, mkTyConApp tc ntys)
+    
 
 ---------------
 normaliseTcArgs :: FamInstEnvs            -- environment with family instances
-- 
GitLab