Mercurial > urweb
comparison src/disjoint.sml @ 709:0406e9cccb72
FOREIGN KEY, without ability to link NULL to NOT NULL (and with some lingering problems in row inference)
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 07 Apr 2009 18:47:47 -0400 |
parents | 12b73f3c108e |
children | a779402841f6 |
comparison
equal
deleted
inserted
replaced
708:1a317a707d71 | 709:0406e9cccb72 |
---|---|
252 val ps2 = decomposeRow env c2 | 252 val ps2 = decomposeRow env c2 |
253 | 253 |
254 val hasUnknown = List.exists (fn Unknown _ => true | _ => false) | 254 val hasUnknown = List.exists (fn Unknown _ => true | _ => false) |
255 val unUnknown = List.mapPartial (fn Unknown _ => NONE | Piece p => SOME p) | 255 val unUnknown = List.mapPartial (fn Unknown _ => NONE | Piece p => SOME p) |
256 in | 256 in |
257 if hasUnknown ps1 orelse hasUnknown ps2 then | 257 if (hasUnknown ps1 andalso not (List.null ps2)) |
258 orelse (hasUnknown ps2 andalso not (List.null ps1)) then | |
258 [(loc, env, denv, c1, c2)] | 259 [(loc, env, denv, c1, c2)] |
259 else | 260 else |
260 let | 261 let |
261 val ps1 = unUnknown ps1 | 262 val ps1 = unUnknown ps1 |
262 val ps2 = unUnknown ps2 | 263 val ps2 = unUnknown ps2 |