Remove unnecessary Maybe from isQuoteFreeElement

This commit is contained in:
Joseph C. Sible 2020-04-05 15:07:36 -04:00
parent 2a8170ba05
commit b0dbc79f69
1 changed files with 4 additions and 4 deletions

View File

@ -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 =