@@ -58,12 +58,11 @@ portTypes rules expr =
59 T.Var _ -> err "free type variables"
59 T.Var _ -> err "free type variables"
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)
66− | otherwise -> err "higher-order functions"
65+ | otherwise -> err "higher-order functions"
68 T.Record _ (Just _) -> err "extended records with free type variables"
67 T.Record _ (Just _) -> err "extended records with free type variables"