The SLinType type is changed so that you don't have to use enumerateTerms each time when you want to know the possible table arguments

This commit is contained in:
kr.angelov
2006-06-01 10:26:49 +00:00
parent f7d8cdfc2e
commit 496f1fc876
4 changed files with 23 additions and 25 deletions

View File

@@ -109,7 +109,7 @@ termPaths ctype term | isBaseType ctype = [ (emptyPath, (ctype, term)) ]
parPaths :: SLinType -> STerm -> [[(SPath, STerm)]]
parPaths ctype term = mapM (uncurry (map . (,))) $ groupPairs $
nubsort [ (path, value) |
(path, (ConT _ _, value)) <- termPaths ctype term ]
(path, (ConT _, value)) <- termPaths ctype term ]
strPaths :: SLinType -> STerm -> [(SPath, STerm)]
strPaths ctype term = [ (path, variants values) | (path, values) <- groupPairs paths ]