File tree 2 files changed +6
-2
lines changed
saw-core/src/Verifier/SAW
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ module Verifier.SAW.Name
41
41
, ExtCns (.. )
42
42
, scFreshNameURI
43
43
, PrimName (.. )
44
+ , primNameToExtCns
44
45
-- * Naming Environments
45
46
, SAWNamingEnv (.. )
46
47
, emptySAWNamingEnv
@@ -256,7 +257,8 @@ instance Ord (PrimName e) where
256
257
instance Hashable (PrimName e ) where
257
258
hashWithSalt x pn = hashWithSalt x (primVarIndex pn)
258
259
259
-
260
+ primNameToExtCns :: PrimName e -> ExtCns e
261
+ primNameToExtCns (PrimName varIdx nm tp) = EC varIdx (ModuleIdentifier nm) tp
260
262
261
263
scFreshNameURI :: Text -> VarIndex -> URI
262
264
scFreshNameURI nm i = fromMaybe (panic " scFreshNameURI" [" Failed to constructed name URI" , show nm, show i]) $
Original file line number Diff line number Diff line change @@ -156,7 +156,9 @@ evalTermF cfg lam recEval tf env =
156
156
case ftf of
157
157
Primitive pn ->
158
158
do pn' <- traverse evalType pn
159
- simPrimitive cfg pn'
159
+ case simConstant cfg tf (primNameToExtCns pn') of
160
+ Just m -> m
161
+ Nothing -> simPrimitive cfg pn'
160
162
161
163
UnitValue -> return VUnit
162
164
You can’t perform that action at this time.
0 commit comments