on master help sign in
Correct check for outgoing higher order functions
461abc0Evan Czaplicki
compiler/Type/ExtraChecks.hs+3−4
@@ -58,12 +58,11 @@ portTypes rules expr =
58
58
59 T.Var _ -> err "free type variables"
59 T.Var _ -> err "free type variables"
60
60
61− T.Lambda t1 t2 ->
61+ T.Lambda _ _ ->
62 case direction of
62 case direction of
63 In -> err "functions"
63 In -> err "functions"
64− Out | firstOrder -> do isValid False direction name t1
64+ Out | firstOrder -> mapM_ (isValid False direction name) (T.collectLambdas tipe)
65− valid t2
66− | otherwise -> err "higher-order functions"
65+ | otherwise -> err "higher-order functions"
67
66
68 T.Record _ (Just _) -> err "extended records with free type variables"
67 T.Record _ (Just _) -> err "extended records with free type variables"
69
68