diff options
Diffstat (limited to 'Logic.icl')
-rw-r--r-- | Logic.icl | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -226,11 +226,12 @@ all_atoms (App1 _ e) = all_atoms e all_atoms (App2 e1 _ e2) = removeDup (all_atoms e1 ++ all_atoms e2) all_atom_options :: Expr -> [[AtomOption]] -all_atom_options e = [opt \\ opt <- all_options (all_atoms e) []] +all_atom_options e = removeDup [opt \\ opt <- all_opts (sort (all_atoms e)) []] where - all_options :: [AtomName] [AtomOption] -> [[AtomOption]] - all_options [] opts = [opts] - all_options [a:as] opts = all_options as (opts ++ [(a,False)]) ++ all_options as (opts ++ [(a,True)]) + all_opts :: [AtomName] [AtomOption] -> [[AtomOption]] + all_opts [] opts = [opts] + all_opts [a:as] opts + = all_opts as (opts ++ [(a,False)]) ++ all_opts as (opts ++ [(a,True)]) substitute :: AtomOption Expr -> Expr substitute (a,b) (Atom a`) |