Skip to content

Commit

Permalink
fix: count formations (as per objectionary/eo#2754 (comment))
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Feb 20, 2024
1 parent 939c0a6 commit 4926ee0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions eo-phi-normalizer/src/Language/EO/Phi/Metrics/Collect.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ countDataless bindings = do
when (deltas == 0) (#dataless += 1)

instance Inspectable Program where
inspect (Program bindings) = do
countDataless bindings
forM_ bindings inspect
inspect (Program bindings) = inspect (Formation bindings)

instance Inspectable Binding where
inspect = \case
Expand Down
5 changes: 3 additions & 2 deletions eo-phi-normalizer/test/eo/phi/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ title: Metrics tests
tests:
- title: prints-itself
phi: |
{ ⟦
{
org ↦ ⟦
eolang ↦ ⟦
prints-itself ↦ ⟦
Expand Down Expand Up @@ -38,5 +39,5 @@ tests:
metrics:
dataless: 5
applications: 8
formations: 4
formations: 5
dispatches: 24

0 comments on commit 4926ee0

Please sign in to comment.