Mercurial > urweb
comparison src/toy_cache.sml @ 2259:6951a645ccdf
Fix effectfulness registration toy cache.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Sun, 27 Sep 2015 17:24:57 -0400 |
parents | af1585e7d645 |
children | 34ad83d9b729 |
comparison
equal
deleted
inserted
replaced
2258:b1ba35ce2613 | 2259:6951a645ccdf |
---|---|
11 val stringTyp = (TFfi ("Basis", "string"), dummyLoc) | 11 val stringTyp = (TFfi ("Basis", "string"), dummyLoc) |
12 val optionStringTyp = (TOption stringTyp, dummyLoc) | 12 val optionStringTyp = (TOption stringTyp, dummyLoc) |
13 fun withTyp typ = map (fn exp => (exp, typ)) | 13 fun withTyp typ = map (fn exp => (exp, typ)) |
14 | 14 |
15 fun ffiAppCache' (func, index, argTyps) = | 15 fun ffiAppCache' (func, index, argTyps) = |
16 EFfiApp ("Sqlcache", func ^ Int.toString index, argTyps) | 16 let |
17 val m = "Sqlcache" | |
18 val f = func ^ Int.toString index | |
19 in | |
20 Settings.addEffectful (m, f); | |
21 EFfiApp (m, f, argTyps) | |
22 end | |
17 | 23 |
18 fun check (index, keys) = | 24 fun check (index, keys) = |
19 ffiAppCache' ("check", index, withTyp stringTyp keys) | 25 ffiAppCache' ("check", index, withTyp stringTyp keys) |
20 | 26 |
21 fun store (index, keys, value) = | 27 fun store (index, keys, value) = |