Skip to content

Commit

Permalink
Use getModeExpectedTypeName
Browse files Browse the repository at this point in the history
  • Loading branch information
ollef committed Jan 13, 2024
1 parent 40590a4 commit 52ec52b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Elaboration.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52ec52b

Please sign in to comment.