turion / rhine

Haskell Functional Reactive Programming framework with type-level clocks
http://hackage.haskell.org/package/rhine
121 stars 21 forks source link

Terminal with no schedules #178

Closed jmatsushita closed 1 year ago

jmatsushita commented 2 years ago

Rebased #165 onto #172 to test the new interface.

Implemented a MonadSchedule instance, and had to use a haskell-terminal fork as predicted and reopened a corresponding PR upstream.

jmatsushita commented 2 years ago

Currently stuck on

TerminalSimple.hs:98:24: error:
    • No instance for (Clock App InputClock)
        arising from a use of ‘|@|’
    • In the expression: inputRhine |@| promptRhine
      In an equation for ‘mainRhine’:
          mainRhine
            = inputRhine |@| promptRhine
            where
                inputRhine :: Rhine App InputClock () ()
                inputRhine = inputSource >-> inputSink @@ inputClock
                promptRhine :: Rhine App PromptClock () ()
                promptRhine = promptSource >-> promptSink @@ liftClock waitClock
   |
98 | mainRhine = inputRhine |@| promptRhine
jmatsushita commented 2 years ago

Oh I think it's because of SelectClock as pointed out here.

turion commented 1 year ago

Superseded by https://github.com/turion/rhine/pull/171