Add a panic for lookupPred EqPred
authorIan Lynagh <igloo@earth.li>
Tue, 6 May 2008 17:17:49 +0000 (17:17 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 6 May 2008 17:17:49 +0000 (17:17 +0000)
It's possible that returning Nothing was the right thing to do here,
but the comment and variable name indicated that it was written for
implicit parameters, so make it a panic for now just in case.

compiler/typecheck/Inst.lhs

index be7c14a..560bf4b 100644 (file)
@@ -832,7 +832,8 @@ lookupPred pred@(ClassP clas tys)
                        ; return Nothing }
        }}
 
-lookupPred ip_pred = return Nothing    -- Implicit parameters
+lookupPred (IParam {}) = return Nothing        -- Implicit parameters
+lookupPred (EqPred {}) = panic "lookupPred EqPred"
 
 record_dfun_usage dfun_id 
   = do { hsc_env <- getTopEnv