{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveLift #-}
module Parsers.Brainfuck.Types where

import Control.DeepSeq (NFData)
import Data.Eq (Eq)
import Data.Ord (Ord)
import GHC.Generics (Generic)
import Text.Show (Show(..))
import qualified Language.Haskell.TH.Syntax as TH

data Instruction
  = Forward
  | Backward
  | Increment
  | Decrement
  | Input
  | Output
  | Loop [Instruction]
  deriving (Int -> Instruction -> ShowS
[Instruction] -> ShowS
Instruction -> String
(Int -> Instruction -> ShowS)
-> (Instruction -> String)
-> ([Instruction] -> ShowS)
-> Show Instruction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Instruction] -> ShowS
$cshowList :: [Instruction] -> ShowS
show :: Instruction -> String
$cshow :: Instruction -> String
showsPrec :: Int -> Instruction -> ShowS
$cshowsPrec :: Int -> Instruction -> ShowS
Show, Instruction -> Instruction -> Bool
(Instruction -> Instruction -> Bool)
-> (Instruction -> Instruction -> Bool) -> Eq Instruction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Instruction -> Instruction -> Bool
$c/= :: Instruction -> Instruction -> Bool
== :: Instruction -> Instruction -> Bool
$c== :: Instruction -> Instruction -> Bool
Eq, Eq Instruction
Eq Instruction
-> (Instruction -> Instruction -> Ordering)
-> (Instruction -> Instruction -> Bool)
-> (Instruction -> Instruction -> Bool)
-> (Instruction -> Instruction -> Bool)
-> (Instruction -> Instruction -> Bool)
-> (Instruction -> Instruction -> Instruction)
-> (Instruction -> Instruction -> Instruction)
-> Ord Instruction
Instruction -> Instruction -> Bool
Instruction -> Instruction -> Ordering
Instruction -> Instruction -> Instruction
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 :: Instruction -> Instruction -> Instruction
$cmin :: Instruction -> Instruction -> Instruction
max :: Instruction -> Instruction -> Instruction
$cmax :: Instruction -> Instruction -> Instruction
>= :: Instruction -> Instruction -> Bool
$c>= :: Instruction -> Instruction -> Bool
> :: Instruction -> Instruction -> Bool
$c> :: Instruction -> Instruction -> Bool
<= :: Instruction -> Instruction -> Bool
$c<= :: Instruction -> Instruction -> Bool
< :: Instruction -> Instruction -> Bool
$c< :: Instruction -> Instruction -> Bool
compare :: Instruction -> Instruction -> Ordering
$ccompare :: Instruction -> Instruction -> Ordering
Ord, (forall (m :: * -> *). Quote m => Instruction -> m Exp)
-> (forall (m :: * -> *).
    Quote m =>
    Instruction -> Code m Instruction)
-> Lift Instruction
forall t.
(forall (m :: * -> *). Quote m => t -> m Exp)
-> (forall (m :: * -> *). Quote m => t -> Code m t) -> Lift t
forall (m :: * -> *). Quote m => Instruction -> m Exp
forall (m :: * -> *). Quote m => Instruction -> Code m Instruction
liftTyped :: forall (m :: * -> *). Quote m => Instruction -> Code m Instruction
$cliftTyped :: forall (m :: * -> *). Quote m => Instruction -> Code m Instruction
lift :: forall (m :: * -> *). Quote m => Instruction -> m Exp
$clift :: forall (m :: * -> *). Quote m => Instruction -> m Exp
TH.Lift, (forall x. Instruction -> Rep Instruction x)
-> (forall x. Rep Instruction x -> Instruction)
-> Generic Instruction
forall x. Rep Instruction x -> Instruction
forall x. Instruction -> Rep Instruction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Instruction x -> Instruction
$cfrom :: forall x. Instruction -> Rep Instruction x
Generic, Instruction -> ()
(Instruction -> ()) -> NFData Instruction
forall a. (a -> ()) -> NFData a
rnf :: Instruction -> ()
$crnf :: Instruction -> ()
NFData)