From 9de193a8572cc6fdff65b0a32818d75b7afba467 Mon Sep 17 00:00:00 2001 From: Rob Dockins Date: Fri, 11 Dec 2020 10:44:17 -0800 Subject: [PATCH] Don't force typechecked terms too early. Fixes #1012 --- src/Cryptol/TypeCheck/Infer.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cryptol/TypeCheck/Infer.hs b/src/Cryptol/TypeCheck/Infer.hs index 603f9c71e..8b9c85932 100644 --- a/src/Cryptol/TypeCheck/Infer.hs +++ b/src/Cryptol/TypeCheck/Infer.hs @@ -171,7 +171,7 @@ appTys expr ts tGoal = P.ELocated e r -> do e' <- inRange r (appTys e ts tGoal) cs <- getCallStacks - pure $! if cs then ELocated r e' else e' + if cs then pure (ELocated r e') else pure e' P.ENeg {} -> mono P.EComplement {} -> mono @@ -373,7 +373,7 @@ checkE expr tGoal = P.ELocated e r -> do e' <- inRange r (checkE e tGoal) cs <- getCallStacks - pure $! if cs then ELocated r e' else e' + if cs then pure (ELocated r e') else pure e' P.ESplit e -> do prim <- mkPrim "splitAt"