comparison src/toy_cache.sml @ 2265:a647a1560628

Hard-code Sqlcache module (in Ur/Web) as effectful and reorder sqlcache.sml.
author Ziv Scully <ziv@mit.edu>
date Wed, 14 Oct 2015 00:07:00 -0400
parents 34ad83d9b729
children 0bdfec16a01d
comparison
equal deleted inserted replaced
2264:bbcf9ba9b39a 2265:a647a1560628
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 let 16 EFfiApp ("Sqlcache", func ^ Int.toString index, argTyps)
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
23 17
24 fun check (index, keys) = 18 fun check (index, keys) =
25 ffiAppCache' ("check", index, withTyp stringTyp keys) 19 ffiAppCache' ("check", index, withTyp stringTyp keys)
26 20
27 fun store (index, keys, value) = 21 fun store (index, keys, value) =