Closed ivanperez-keera closed 6 hours ago
Change Manager: Confirmed that the issue exists.
Technical Lead: Confirmed that the issue should be addressed.
Technical Lead: Issue scheduled for fixing in Ogma 1.4.1. Fix assigned to: @ivanperez-keera.
Implementor: Solution implemented, review requested.
Change Manager: Verified that:
Solution is implemented:
IfElse
, in which case it prints the message success:
FROM ubuntu:focal
RUN apt-get update
RUN apt-get install --yes git
SHELL ["/bin/bash", "-c"] CMD git clone $REPO \ && cd $NAME \ && git checkout $COMMIT \ && ! grep -niHre 'IfElse' --include='*.cabal' ogma** \ && echo "Success"
Command:
docker run -e "REPO=https://github.com/ivanperez-keera/ogma" -e "NAME=ogma" -e PAT="ogma-" -e "COMMIT=0db6542adbeeba654f4d011126a30a6adeeadb81" -it ogma-verify-150
Change Manager: Implementation ready to be merged.
Description
The dependency on
IfElse
is quite unnecessary: it seems like the only function we use from that library isawhen :: Monad m => Maybe a -> (a -> m ()) -> m ()
, which is a type-specialized version ofData.Foldable.for_
.. Since the latter is inbase
, we can simplify Ogma by removing the dependency onIfElse
.Type
Additional context
None.
Requester
Method to check presence of bug
Not applicable (not a bug).
Expected result
IfElse is not required by any library in ogma.
Desired result
IfElse is not required by any library in ogma.
Proposed solution
Replace calls to
awhen
with calls tofor_
Remove the dependency on IfElse.
Further notes
None.