module TuringMachine.Move (
    Move,
    toLeft,
    toRight,
    versa,
  ) where

data Move = ToLeft | ToRight
    deriving (Move -> Move -> Bool
(Move -> Move -> Bool) -> (Move -> Move -> Bool) -> Eq Move
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Move -> Move -> Bool
$c/= :: Move -> Move -> Bool
== :: Move -> Move -> Bool
$c== :: Move -> Move -> Bool
Eq, Eq Move
Eq Move
-> (Move -> Move -> Ordering)
-> (Move -> Move -> Bool)
-> (Move -> Move -> Bool)
-> (Move -> Move -> Bool)
-> (Move -> Move -> Bool)
-> (Move -> Move -> Move)
-> (Move -> Move -> Move)
-> Ord Move
Move -> Move -> Bool
Move -> Move -> Ordering
Move -> Move -> Move
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Move -> Move -> Move
$cmin :: Move -> Move -> Move
max :: Move -> Move -> Move
$cmax :: Move -> Move -> Move
>= :: Move -> Move -> Bool
$c>= :: Move -> Move -> Bool
> :: Move -> Move -> Bool
$c> :: Move -> Move -> Bool
<= :: Move -> Move -> Bool
$c<= :: Move -> Move -> Bool
< :: Move -> Move -> Bool
$c< :: Move -> Move -> Bool
compare :: Move -> Move -> Ordering
$ccompare :: Move -> Move -> Ordering
$cp1Ord :: Eq Move
Ord)

instance Show Move where
    show :: Move -> String
show Move
ToLeft  = String
"<-"
    show Move
ToRight = String
"->"

toLeft :: Move
toLeft :: Move
toLeft = Move
ToLeft

toRight :: Move
toRight :: Move
toRight = Move
ToRight

versa :: Move -> Move
versa :: Move -> Move
versa Move
ToLeft = Move
ToRight
versa Move
ToRight = Move
ToLeft