385 x = x' andalso ((sn = sn' andalso a <> a') orelse |
385 x = x' andalso ((sn = sn' andalso a <> a') orelse |
386 (sn <> sn' andalso a = a')) |
386 (sn <> sn' andalso a = a')) |
387 | _ => false) clauses then |
387 | _ => false) clauses then |
388 NONE |
388 NONE |
389 else |
389 else |
390 SOME ([(x, a)] :: clauses) |
390 SOME ([(x, (sn, a))] :: clauses) |
391 |
391 |
392 fun add_assign_disjunct _ NONE = NONE |
392 fun add_assign_disjunct _ NONE = NONE |
393 | add_assign_disjunct asg (SOME asgs) = SOME (insert (op =) asg asgs) |
393 | add_assign_disjunct asg (SOME asgs) = SOME (insert (op =) asg asgs) |
394 |
394 |
395 fun add_assign_clause NONE = I |
395 fun add_assign_clause NONE = I |
443 SOME cset) |
443 SOME cset) |
444 |> do_mtype_comp Leq xs M12 M22 |
444 |> do_mtype_comp Leq xs M12 M22 |
445 | do_mtype_comp cmp xs (M1 as MPair (M11, M12)) (M2 as MPair (M21, M22)) |
445 | do_mtype_comp cmp xs (M1 as MPair (M11, M12)) (M2 as MPair (M21, M22)) |
446 cset = |
446 cset = |
447 (cset |> fold (uncurry (do_mtype_comp cmp xs)) [(M11, M21), (M12, M22)] |
447 (cset |> fold (uncurry (do_mtype_comp cmp xs)) [(M11, M21), (M12, M22)] |
448 handle Library.UnequalLengths => |
448 handle ListPair.UnequalLengths => |
449 raise MTYPE ("Nitpick_Mono.do_mtype_comp", [M1, M2], [])) |
449 raise MTYPE ("Nitpick_Mono.do_mtype_comp", [M1, M2], [])) |
450 | do_mtype_comp _ _ (MType _) (MType _) cset = |
450 | do_mtype_comp _ _ (MType _) (MType _) cset = |
451 cset (* no need to compare them thanks to the cache *) |
451 cset (* no need to compare them thanks to the cache *) |
452 | do_mtype_comp cmp _ M1 M2 _ = |
452 | do_mtype_comp cmp _ M1 M2 _ = |
453 raise MTYPE ("Nitpick_Mono.do_mtype_comp (" ^ string_for_comp_op cmp ^ ")", |
453 raise MTYPE ("Nitpick_Mono.do_mtype_comp (" ^ string_for_comp_op cmp ^ ")", |