diff --git a/src/Semantics/PartialEvaluator.hs b/src/Semantics/PartialEvaluator.hs index 813d6ae..55bf0a4 100644 --- a/src/Semantics/PartialEvaluator.hs +++ b/src/Semantics/PartialEvaluator.hs @@ -82,11 +82,9 @@ partial ns (Application t1@(Pattern (Variable x _)) t2 a) = partial ns (Application t1 t2 a) = do t1' <- partial ns t1 t2' <- partial ns t2 - if canonical t2' - then if canonical t1' - then do f <- function t1' - partial ns (f t2') - else return $ Application t1' t2' a + if canonical t2' && canonical t1' + then do f <- function t1' + partial ns (f t2') else return $ Application t1' t2' a partial ns (Case t0 ts a) = do v <- partial ns t0