Mercurial > urweb
comparison src/disjoint.sml @ 335:bc5015b89dd2
Name disjointness check changed to case insensitive
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 13 Sep 2008 19:53:07 -0400 |
parents | 9601c717d2f3 |
children | b85e6ba56618 |
comparison
equal
deleted
inserted
replaced
334:9601c717d2f3 | 335:bc5015b89dd2 |
---|---|
141 fun enter denv = | 141 fun enter denv = |
142 PM.foldli (fn (p, pset, denv') => | 142 PM.foldli (fn (p, pset, denv') => |
143 PM.insert (denv', pieceEnter p, PS.map pieceEnter pset)) | 143 PM.insert (denv', pieceEnter p, PS.map pieceEnter pset)) |
144 PM.empty denv | 144 PM.empty denv |
145 | 145 |
146 val lowercase = CharVector.map Char.toLower | |
147 | |
146 fun prove1 denv (p1, p2) = | 148 fun prove1 denv (p1, p2) = |
147 case (p1, p2) of | 149 case (p1, p2) of |
148 ((NameC s1, _), (NameC s2, _)) => s1 <> s2 | 150 ((NameC s1, _), (NameC s2, _)) => lowercase s1 <> lowercase s2 |
149 | _ => | 151 | _ => |
150 case PM.find (denv, p1) of | 152 case PM.find (denv, p1) of |
151 NONE => false | 153 NONE => false |
152 | SOME pset => PS.member (pset, p2) | 154 | SOME pset => PS.member (pset, p2) |
153 | 155 |