From 52ec52bbb6952bbb57d705848662fdcc760168af Mon Sep 17 00:00:00 2001 From: Olle Fredriksson Date: Sat, 13 Jan 2024 01:14:53 +0100 Subject: [PATCH] Use getModeExpectedTypeName --- src/Elaboration.hs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Elaboration.hs b/src/Elaboration.hs index cd4a91b..b86036a 100644 --- a/src/Elaboration.hs +++ b/src/Elaboration.hs @@ -562,12 +562,9 @@ elaborateWith context spannedTerm@(Surface.Term span term) mode canPostpone = do type' <- evaluate context $ Syntax.fromVoid type_ result context mode (Syntax.Spanned span $ Syntax.Global qualifiedName) type' Just (Scope.Constructors constructorCandidates dataCandidates) -> do - resolution <- resolveConstructor constructorCandidates dataCandidates $ - case mode of - Check expectedType -> - getExpectedTypeName context expectedType - Infer m -> - m + resolution <- + resolveConstructor constructorCandidates dataCandidates $ + getModeExpectedTypeName context mode case resolution of Left blockingMeta -> case (canPostpone, mode) of