File tree 2 files changed +7
-7
lines changed
saw-core/src/Verifier/SAW
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ resolveArgs (Matcher p m) (defaultArgsMatcher -> args@(ArgsMatcher pl _)) =
205
205
206
206
-- | Match a global definition.
207
207
asGlobalDef :: Ident -> Matcher ()
208
- asGlobalDef ident = Matcher (Net. Atom (identText ident)) f
208
+ asGlobalDef ident = Matcher (Net. Atom (identBaseName ident)) f
209
209
where f (R. asGlobalDef -> Just o) | ident == o = return ()
210
210
f _ = Nothing
211
211
@@ -262,15 +262,15 @@ asRecordSelector m = asVar $ \t -> _1 (runMatcher m) =<< R.asRecordSelector t
262
262
263
263
-- | Match a constructor
264
264
asCtor :: ArgsMatchable v a => Ident -> v a -> Matcher a
265
- asCtor o = resolveArgs $ Matcher (Net. Atom (identText o)) match
265
+ asCtor o = resolveArgs $ Matcher (Net. Atom (identBaseName o)) match
266
266
where match t = do
267
267
CtorApp c params l <- R. asFTermF t
268
268
guard (o == primName c)
269
269
return (params ++ l)
270
270
271
271
-- | Match a datatype.
272
272
asDataType :: ArgsMatchable v a => PrimName a -> v a -> Matcher a
273
- asDataType o = resolveArgs $ Matcher (Net. Atom (identText (primName o))) match
273
+ asDataType o = resolveArgs $ Matcher (Net. Atom (identBaseName (primName o))) match
274
274
where match t = do
275
275
DataTypeApp dt params l <- R. asFTermF t
276
276
guard (primVarIndex dt == primVarIndex o)
Original file line number Diff line number Diff line change @@ -401,15 +401,15 @@ instance Net.Pattern Term where
401
401
termToPat :: Term -> Net. Pat
402
402
termToPat t =
403
403
case unwrapTermF t of
404
- Constant ec _ -> Net. Atom (toAbsoluteName (ecName ec))
404
+ Constant ec _ -> Net. Atom (toShortName (ecName ec))
405
405
App t1 t2 -> Net. App (termToPat t1) (termToPat t2)
406
- FTermF (Primitive pn) -> Net. Atom (identText (primName pn))
406
+ FTermF (Primitive pn) -> Net. Atom (identBaseName (primName pn))
407
407
FTermF (Sort s) -> Net. Atom (Text. pack (' *' : show s))
408
408
FTermF (NatLit _) -> Net. Var
409
409
FTermF (DataTypeApp c ps ts) ->
410
- foldl Net. App (Net. Atom (identText (primName c))) (map termToPat (ps ++ ts))
410
+ foldl Net. App (Net. Atom (identBaseName (primName c))) (map termToPat (ps ++ ts))
411
411
FTermF (CtorApp c ps ts) ->
412
- foldl Net. App (Net. Atom (identText (primName c))) (map termToPat (ps ++ ts))
412
+ foldl Net. App (Net. Atom (identBaseName (primName c))) (map termToPat (ps ++ ts))
413
413
_ -> Net. Var
414
414
415
415
unwrapTermF :: Term -> TermF Term
You can’t perform that action at this time.
0 commit comments