Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Commit

Permalink
Use safeSymbol instead of userSymbol to avoid an error case.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Huffman committed Nov 3, 2020
1 parent 7b6167e commit 47f6264
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions saw-core-what4/src/Verifier/SAW/Simulator/What4.hs
Original file line number Diff line number Diff line change
Expand Up @@ -953,10 +953,7 @@ mkConstant ::
forall sym ty.
(IsSymExprBuilder sym) =>
sym -> String -> BaseTypeRepr ty -> IO (SymExpr sym ty)
mkConstant sym name ty =
case W.userSymbol name of
Right solverSymbol -> W.freshConstant sym solverSymbol ty
Left _ -> fail $ "Cannot create solver symbol " ++ name
mkConstant sym name ty = W.freshConstant sym (W.safeSymbol name) ty

-- | Generate a new variable from a given BaseType

Expand Down

0 comments on commit 47f6264

Please sign in to comment.