TcUnify: Assert precondition of matchExpectedTyConApp
authorBen Gamari <bgamari.foss@gmail.com>
Tue, 14 Feb 2017 14:31:08 +0000 (09:31 -0500)
committerBen Gamari <ben@smart-cactus.org>
Tue, 14 Feb 2017 15:53:01 +0000 (10:53 -0500)
Test Plan: Validate

Reviewers: simonpj, austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D3128

compiler/typecheck/TcUnify.hs

index b7c4aee..db3233e 100644 (file)
@@ -367,7 +367,7 @@ matchExpectedTyConApp :: TyCon                -- T :: forall kv1 ... kvm. k1 ->
 -- Postcondition: (T k1 k2 k3 a b c) is well-kinded
 
 matchExpectedTyConApp tc orig_ty
-  = go orig_ty
+  = ASSERT(tc /= funTyCon) go orig_ty
   where
     go ty
        | Just ty' <- coreView ty