程序代写代做代考 module PinchDef where

module PinchDef where

import Data.Array

data Direction = Down | Up
deriving (Eq, Show)

data Msg = NoMsg | OKMsg | BadPositionMsg
deriving (Eq, Show)

class Monad m => MonadPinchSim m where
askPinch :: Msg -> Array Int Integer -> m (Int, Direction)

data PinchTrace a
= Pure a
| Step Msg (Array Int Integer) (Int -> Direction -> PinchTrace a)