diff --git a/Data/SBV/Core/Symbolic.hs b/Data/SBV/Core/Symbolic.hs index b3e935ca..67b51568 100644 --- a/Data/SBV/Core/Symbolic.hs +++ b/Data/SBV/Core/Symbolic.hs @@ -1533,7 +1533,7 @@ registerLabel whence st nm registerSpecialFunction :: State -> Op -> IO () registerSpecialFunction st o = do progInfo <- readIORef (rProgInfo st) - let upd p@ProgInfo{progSpecialFuncs} = p{progSpecialFuncs = o : progSpecialFuncs} + let upd p@ProgInfo{progSpecialFuncs} = p{progSpecialFuncs = o : progSpecialFuncs} when (o `notElem` progSpecialFuncs progInfo) $ modifyState st rProgInfo upd (pure ()) -- | Create a new constant; hash-cons as necessary