comparison src/monoize.sml @ 746:2c7244c066f1

sql_ufunc and octet_length
author Adam Chlipala <adamc@hcoop.net>
date Sun, 26 Apr 2009 12:35:45 -0400
parents f7e2026dd5ae
children 5f9b9972e6b8
comparison
equal deleted inserted replaced
745:ee2feab275db 746:2c7244c066f1
198 | L.CApp ((L.CFfi ("Basis", "sql_maxable"), _), _) => 198 | L.CApp ((L.CFfi ("Basis", "sql_maxable"), _), _) =>
199 (L'.TRecord [], loc) 199 (L'.TRecord [], loc)
200 | L.CApp ((L.CFfi ("Basis", "sql_arith"), _), _) => 200 | L.CApp ((L.CFfi ("Basis", "sql_arith"), _), _) =>
201 (L'.TRecord [], loc) 201 (L'.TRecord [], loc)
202 | L.CApp ((L.CFfi ("Basis", "sql_nfunc"), _), _) => 202 | L.CApp ((L.CFfi ("Basis", "sql_nfunc"), _), _) =>
203 (L'.TFfi ("Basis", "string"), loc)
204 | L.CApp ((L.CApp ((L.CFfi ("Basis", "sql_ufunc"), _), _), _), _) =>
203 (L'.TFfi ("Basis", "string"), loc) 205 (L'.TFfi ("Basis", "string"), loc)
204 206
205 | L.CApp ((L.CFfi ("Basis", "channel"), _), _) => 207 | L.CApp ((L.CFfi ("Basis", "channel"), _), _) =>
206 (L'.TFfi ("Basis", "channel"), loc) 208 (L'.TFfi ("Basis", "channel"), loc)
207 209
1987 in 1989 in
1988 ((L'.EAbs ("s", s, s, (L'.ERel 0, loc)), loc), 1990 ((L'.EAbs ("s", s, s, (L'.ERel 0, loc)), loc),
1989 fm) 1991 fm)
1990 end 1992 end
1991 | L.EFfi ("Basis", "sql_current_timestamp") => ((L'.EPrim (Prim.String "CURRENT_TIMESTAMP"), loc), fm) 1993 | L.EFfi ("Basis", "sql_current_timestamp") => ((L'.EPrim (Prim.String "CURRENT_TIMESTAMP"), loc), fm)
1994
1995 | L.ECApp (
1996 (L.ECApp (
1997 (L.ECApp (
1998 (L.ECApp (
1999 (L.ECApp (
2000 (L.EFfi ("Basis", "sql_ufunc"), _),
2001 _), _),
2002 _), _),
2003 _), _),
2004 _), _),
2005 _) =>
2006 let
2007 val s = (L'.TFfi ("Basis", "string"), loc)
2008 fun sc s = (L'.EPrim (Prim.String s), loc)
2009 in
2010 ((L'.EAbs ("f", s, (L'.TFun (s, s), loc),
2011 (L'.EAbs ("x", s, s,
2012 strcat [(L'.ERel 1, loc),
2013 sc "(",
2014 (L'.ERel 0, loc),
2015 sc ")"]), loc)), loc),
2016 fm)
2017 end
2018 | L.EFfi ("Basis", "sql_octet_length") => ((L'.EPrim (Prim.String "octet_length"), loc), fm)
1992 2019
1993 | (L.ECApp ( 2020 | (L.ECApp (
1994 (L.ECApp ( 2021 (L.ECApp (
1995 (L.ECApp ( 2022 (L.ECApp (
1996 (L.ECApp ( 2023 (L.ECApp (