aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sql.sml
diff options
context:
space:
mode:
authorGravatar Ziv Scully <ziv@mit.edu>2014-10-31 09:25:03 -0400
committerGravatar Ziv Scully <ziv@mit.edu>2014-10-31 09:25:03 -0400
commit7b94f3433f47e4e5010dc2af6010181da49637e8 (patch)
treedf609b60422a34b84de0420720afd59ce30b7989 /src/sql.sml
parent0185025d29459fe681afa1c01faa22a5d8034884 (diff)
Mostly finish effectfulness analysis.
Diffstat (limited to 'src/sql.sml')
-rw-r--r--src/sql.sml8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sql.sml b/src/sql.sml
index d38de055..7cfed022 100644
--- a/src/sql.sml
+++ b/src/sql.sml
@@ -272,10 +272,12 @@ fun sqlify chs =
fun sqlifySqlcache chs =
case chs of
- (* Match entire FFI application, not just its argument. *)
- Exp (e' as EFfiApp ("Basis", f, [(_, _)]), _) :: chs =>
+ (* Could have variables as well as FFIs. *)
+ Exp (e as (ERel _, _)) :: chs => SOME (e, chs)
+ (* If it is an FFI, match the entire expression. *)
+ | Exp (e as (EFfiApp ("Basis", f, [(_, _)]), _)) :: chs =>
if String.isPrefix "sqlify" f then
- SOME ((e', ErrorMsg.dummySpan), chs)
+ SOME (e, chs)
else
NONE
| Exp (ECase (e, [((PCon (_, PConFfi {mod = "Basis", con = "True", ...}, NONE), _),