From 79119313a66fc7abf08a4d706933aa51c46ce392 Mon Sep 17 00:00:00 2001 From: Brian Huffman Date: Wed, 29 Jul 2020 12:32:19 -0700 Subject: [PATCH] Reimplement saw-core `error` with `userError` instead of `panic`. This is a quick fix for #59. --- saw-core/src/Verifier/SAW/Simulator/Prims.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/saw-core/src/Verifier/SAW/Simulator/Prims.hs b/saw-core/src/Verifier/SAW/Simulator/Prims.hs index 5e696c5057..8d3f7505c7 100644 --- a/saw-core/src/Verifier/SAW/Simulator/Prims.hs +++ b/saw-core/src/Verifier/SAW/Simulator/Prims.hs @@ -39,6 +39,7 @@ import Numeric.Natural (Natural) import Verifier.SAW.Term.Functor (Ident, alistAllFields) import Verifier.SAW.Simulator.Value import Verifier.SAW.Prim +import qualified Verifier.SAW.Prim as Prim import qualified Verifier.SAW.Utils as Panic (panic) @@ -1191,8 +1192,8 @@ errorOp = constFun $ strictFun $ \x -> case x of - VString s -> panic s - _ -> panic "unknown error" + VString s -> Prim.userError s + _ -> Prim.userError "unknown error" ------------------------------------------------------------ -- Conditionals