1
Fork 0
solar-conflux/sprint/src/Main.purs
2023-06-04 15:18:40 +02:00

16 lines
403 B
Plaintext

module Main where
import Prelude
import Effect (Effect)
import Effect.Class.Console (logShow)
import Sprint (Sprint(..), State(..), evalState, extract)
import Type.Data.List (type (:>), Nil')
myProgram :: Sprint (State Int :> Nil') Int
myProgram = Bind \f -> f "State" $ Put 2 \_ -> Bind \f' -> f' "State" $ Get \s -> Pure s
main :: Effect Unit
main = do
logShow $ extract $ evalState 0 myProgram