Skip to content

Commit

Permalink
fix redundancy criteria description
Browse files Browse the repository at this point in the history
  • Loading branch information
rudymatela committed Feb 14, 2024
1 parent 7cecc26 commit 2b2296e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Conjure/Defn/Redundancy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ hasRedundantRecursion d = not (null rs) && any matchesRHS bs
-- | Returns whether a given 'Defn' is redundant
-- with regards to root recursions.
--
-- When there is a single base case and all recursive calls
-- When there is a single constant base case and all recursive calls
-- are at the root: we have a redundant function.
-- (Modulo error functions, which are undesired anyway.)
--
Expand All @@ -150,11 +150,6 @@ hasRedundantRecursion d = not (null rs) && any matchesRHS bs
--
-- Above it does not really pays off to follow the recursive calls,
-- at the end we always reach an empty list.
--
-- The same goes for the following:
--
-- > xs ? [] = xs
-- > xs ? (x:ys) = xs ? ys
isRedundantByRootRecursions :: Defn -> Bool
isRedundantByRootRecursions d = case partition isGround $ map snd d of
([b], rs@(_:_)) -> all isHole rs
Expand Down

0 comments on commit 2b2296e

Please sign in to comment.