Remove unnecessary Maybe from isQuoteFreeElement
This commit is contained in:
parent
2a8170ba05
commit
b0dbc79f69
|
@ -293,15 +293,15 @@ isQuoteFree = isQuoteFreeNode False
|
||||||
|
|
||||||
|
|
||||||
isQuoteFreeNode strict tree t =
|
isQuoteFreeNode strict tree t =
|
||||||
(isQuoteFreeElement t == Just True) ||
|
isQuoteFreeElement t ||
|
||||||
headOrDefault False (mapMaybe isQuoteFreeContext (drop 1 $ getPath tree t))
|
headOrDefault False (mapMaybe isQuoteFreeContext (drop 1 $ getPath tree t))
|
||||||
where
|
where
|
||||||
-- Is this node self-quoting in itself?
|
-- Is this node self-quoting in itself?
|
||||||
isQuoteFreeElement t =
|
isQuoteFreeElement t =
|
||||||
case t of
|
case t of
|
||||||
T_Assignment {} -> return True
|
T_Assignment {} -> True
|
||||||
T_FdRedirect {} -> return True
|
T_FdRedirect {} -> True
|
||||||
_ -> Nothing
|
_ -> False
|
||||||
|
|
||||||
-- Are any subnodes inherently self-quoting?
|
-- Are any subnodes inherently self-quoting?
|
||||||
isQuoteFreeContext t =
|
isQuoteFreeContext t =
|
||||||
|
|
Loading…
Reference in New Issue