comparison src/monoize.sml @ 436:024478c34f4d

time type
author Adam Chlipala <adamc@hcoop.net>
date Thu, 30 Oct 2008 14:36:48 -0400
parents 0ce90d4d9ae7
children 1a4c1b5f4d8f
comparison
equal deleted inserted replaced
435:f7b25375c0cf 436:024478c34f4d
818 in 818 in
819 ((L'.EAbs ("s", s, s, (L'.ERel 0, loc)), loc), fm) 819 ((L'.EAbs ("s", s, s, (L'.ERel 0, loc)), loc), fm)
820 end 820 end
821 | L.EFfi ("Basis", "show_bool") => 821 | L.EFfi ("Basis", "show_bool") =>
822 ((L'.EFfi ("Basis", "boolToString"), loc), fm) 822 ((L'.EFfi ("Basis", "boolToString"), loc), fm)
823 | L.EFfi ("Basis", "show_time") =>
824 ((L'.EFfi ("Basis", "timeToString"), loc), fm)
823 825
824 | L.ECApp ((L.EFfi ("Basis", "read"), _), t) => 826 | L.ECApp ((L.EFfi ("Basis", "read"), _), t) =>
825 let 827 let
826 val t = monoType env t 828 val t = monoType env t
827 val s = (L'.TFfi ("Basis", "string"), loc) 829 val s = (L'.TFfi ("Basis", "string"), loc)
868 let 870 let
869 val t = (L'.TFfi ("Basis", "bool"), loc) 871 val t = (L'.TFfi ("Basis", "bool"), loc)
870 in 872 in
871 ((L'.ERecord [("Read", (L'.EFfi ("Basis", "stringToBool"), loc), readType' (t, loc)), 873 ((L'.ERecord [("Read", (L'.EFfi ("Basis", "stringToBool"), loc), readType' (t, loc)),
872 ("ReadError", (L'.EFfi ("Basis", "stringToBool_error"), loc), readErrType (t, loc))], 874 ("ReadError", (L'.EFfi ("Basis", "stringToBool_error"), loc), readErrType (t, loc))],
875 loc),
876 fm)
877 end
878 | L.EFfi ("Basis", "read_time") =>
879 let
880 val t = (L'.TFfi ("Basis", "time"), loc)
881 in
882 ((L'.ERecord [("Read", (L'.EFfi ("Basis", "stringToTime"), loc), readType' (t, loc)),
883 ("ReadError", (L'.EFfi ("Basis", "stringToTime_error"), loc), readErrType (t, loc))],
873 loc), 884 loc),
874 fm) 885 fm)
875 end 886 end
876 887
877 | L.ECApp ((L.EFfi ("Basis", "return"), _), t) => 888 | L.ECApp ((L.EFfi ("Basis", "return"), _), t) =>