From: Anders Mörtberg Date: Thu, 16 Apr 2015 09:17:12 +0000 (+0200) Subject: Change gensym X-Git-Url: https://git.ak3n.com/?a=commitdiff_plain;h=0400abcbb0cb6e188e86873148c84a92b75d3a82;p=cubicaltt.git Change gensym --- diff --git a/Connections.hs b/Connections.hs index e5c4565..da48162 100644 --- a/Connections.hs +++ b/Connections.hs @@ -240,10 +240,14 @@ propInvFormulaIncomp phi b = incomparables (invFormula phi b) -- | Nominal gensym :: [Name] -> Name -gensym xs = Name ('?' : show max) - where max = maximum' [ read x | Name ('?':x) <- xs ] - maximum' [] = 0 - maximum' xs = maximum xs + 1 +gensym xs = head (ys \\ xs) + where ys = map Name $ ["i","j","k","l"] ++ map (('i':) . show) [0..] + +-- gensym :: [Name] -> Name +-- gensym xs = Name ('?' : show max) +-- where max = maximum' [ read x | Name ('?':x) <- xs ] +-- maximum' [] = 0 +-- maximum' xs = maximum xs + 1 gensyms :: [Name] -> [Name] gensyms d = let x = gensym d in x : gensyms (x : d)