Skip to content

Conversation

@blackheaven
Copy link
Contributor

Ciao @marcosh

I'm missing your code reviews :)

Not sure how the whole thing is working, let me know what kind of tests could be relevant.

@blackheaven blackheaven force-pushed the machine-stm branch 2 times, most recently from e9c6ac9 to 2d953ee Compare October 12, 2025 22:15
@blackheaven
Copy link
Contributor Author

Not my errors:

[ 2 of 18] Compiling Data.Machine.Plan ( src/Data/Machine/Plan.hs, dist/build/Data/Machine/Plan.o, dist/build/Data/Machine/Plan.dyn_o )

src/Data/Machine/Plan.hs:179:14: error:
Error:     • Couldn't match type: PlanT k1 o0 m0 a0
                     with: forall (m :: * -> *). PlanT k o m ()
      Expected: Maybe o -> Plan k o ()
        Actual: Maybe o -> PlanT k1 o0 m0 a0
    • In the expression: maybe stop yield
      In an equation for ‘maybeYield’: maybeYield = maybe stop yield
    • Relevant bindings include
        maybeYield :: Maybe o -> Plan k o ()
          (bound at src/Data/Machine/Plan.hs:179:1)
    |
179 | maybeYield = maybe stop yield
    |              ^^^^^^^^^^^^^^^^

src/Data/Machine/Plan.hs:179:25: error:
Error:     • Couldn't match type: forall (m :: * -> *). PlanT k0 o m ()
                     with: PlanT k1 o0 m0 a0
      Expected: o -> PlanT k1 o0 m0 a0
        Actual: o -> Plan k0 o ()
    • In the second argument of ‘maybe’, namely ‘yield’
      In the expression: maybe stop yield
      In an equation for ‘maybeYield’: maybeYield = maybe stop yield
    • Relevant bindings include
        maybeYield :: Maybe o -> Plan k o ()
          (bound at src/Data/Machine/Plan.hs:179:1)
    |
179 | maybeYield = maybe stop yield
    |                         ^^^^^

src/Data/Machine/Plan.hs:203:28: error:
Error:     • Couldn't match type: forall (m1 :: * -> *). PlanT k2 a m1 ()
                     with: PlanT k a m a1
      Expected: Maybe a -> PlanT k a m a1
        Actual: Maybe a -> Plan k2 a ()
    • In the second argument of ‘(>>=)’, namely ‘maybeYield’
Error: cabal: Failed to build machines-0.7 (which is required by
test:crem-spec from crem-0.1.0.0 and test:crem-doctests from crem-0.1.0.0).
See the build log above for details.

      In a stmt of a 'do' block: (lift f >>= maybeYield)
      In the expression:
        do (lift f >>= maybeYield)
           exhaust f
    • Relevant bindings include
        f :: m (Maybe a) (bound at src/Data/Machine/Plan.hs:203:9)
        exhaust :: m (Maybe a) -> PlanT k a m ()
          (bound at src/Data/Machine/Plan.hs:203:1)
    |
203 | exhaust f = do (lift f >>= maybeYield); exhaust f
    |                            ^^^^^^^^^^
Error: Process completed with exit code 1.

@blackheaven blackheaven force-pushed the machine-stm branch 4 times, most recently from 8605c71 to ad87534 Compare October 14, 2025 21:03
@blackheaven
Copy link
Contributor Author

I can disable it for GHC <= 9.0.*

@blackheaven blackheaven force-pushed the machine-stm branch 2 times, most recently from c9394d8 to cc05ed1 Compare October 16, 2025 07:52
@marcosh marcosh merged commit d8627f0 into marcosh:main Oct 23, 2025
23 checks passed
@marcosh
Copy link
Owner

marcosh commented Oct 23, 2025

thanks a lot @blackheaven!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants