Tiny refactor
authorIan Lynagh <igloo@earth.li>
Fri, 24 Apr 2009 14:02:27 +0000 (14:02 +0000)
committerIan Lynagh <igloo@earth.li>
Fri, 24 Apr 2009 14:02:27 +0000 (14:02 +0000)
compiler/typecheck/TcPat.lhs

index 82ac5e3..23e6bbf 100644 (file)
@@ -365,8 +365,7 @@ tc_pat pstate lpat@(LazyPat pat) pat_ty thing_inside
        -- getLIE/extendLIEs: see Note [Hopping the LIE in lazy patterns]
 
        -- Check no existentials
-       ; if (null pat_tvs) then return ()
-         else lazyPatErr lpat pat_tvs
+       ; unless (null pat_tvs) $ lazyPatErr lpat pat_tvs
 
        -- Check that the pattern has a lifted type
        ; pat_tv <- newBoxyTyVar liftedTypeKind