Removed a use of the head function from PrettyShow
This commit is contained in:
parent
1b7e0985cc
commit
093070454b
|
@ -87,7 +87,9 @@ foldPatternList (Match con patList)
|
||||||
= if (showConstr con == "(:)")
|
= if (showConstr con == "(:)")
|
||||||
then
|
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
|
--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 []
|
else []
|
||||||
foldPatternList _ = []
|
foldPatternList _ = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user