Mercurial > urweb
diff src/lru_cache.sml @ 2258:b1ba35ce2613
Fix bug where pure caching didn't treat FFI applications as effectful.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Sun, 27 Sep 2015 17:02:14 -0400 |
parents | c275bbc41194 |
children | 34ad83d9b729 |
line wrap: on
line diff
--- a/src/lru_cache.sml Sun Sep 27 14:46:12 2015 -0400 +++ b/src/lru_cache.sml Sun Sep 27 17:02:14 2015 -0400 @@ -13,7 +13,13 @@ fun withTyp typ = map (fn exp => (exp, typ)) fun ffiAppCache' (func, index, argTyps) = - EFfiApp ("Sqlcache", func ^ Int.toString index, argTyps) + let + val m = "Sqlcache" + val f = func ^ Int.toString index + in + Settings.addEffectful (m, f); + EFfiApp (m, f, argTyps) + end fun check (index, keys) = ffiAppCache' ("check", index, withTyp stringTyp keys)