Removed a use of the head function from PrettyShow

This commit is contained in:
Neil Brown 2008-02-05 16:19:00 +00:00
parent 1b7e0985cc
commit 093070454b

View File

@ -87,7 +87,9 @@ foldPatternList (Match con patList)
= if (showConstr con == "(:)")
then
--patList must contain two items. The first is the list item (to be returned), the second is a nested list -- possibly the empty list
(head patList) : (foldPatternList $ last patList)
(case patList of
(p:ps:[]) -> p : (foldPatternList ps)
_ -> error "List constructor with other than two children")
else []
foldPatternList _ = []