# Pastebin F0lhI2mT infer :: Context -> LC -> Maybe Type infer ctx (Ite t1 t2 t3) = case (infer ctx t1, infer ctx t2, infer ctx t3) of (Just Bool, Just ty2, Just ty3) | ty2 == ty3 -> Just ty2 | otherwise -> Nothing _ -> Nothing