{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell   #-}
-- | Data type used for minting and burning the thread token value.
module Plutus.Contract.StateMachine.MintingPolarity where

import PlutusTx qualified
import PlutusTx.Prelude
import Prelude qualified as Haskell

data MintingPolarity = Mint | Burn deriving (MintingPolarity -> MintingPolarity -> Bool
(MintingPolarity -> MintingPolarity -> Bool)
-> (MintingPolarity -> MintingPolarity -> Bool)
-> Eq MintingPolarity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MintingPolarity -> MintingPolarity -> Bool
$c/= :: MintingPolarity -> MintingPolarity -> Bool
== :: MintingPolarity -> MintingPolarity -> Bool
$c== :: MintingPolarity -> MintingPolarity -> Bool
Haskell.Eq, Int -> MintingPolarity -> ShowS
[MintingPolarity] -> ShowS
MintingPolarity -> String
(Int -> MintingPolarity -> ShowS)
-> (MintingPolarity -> String)
-> ([MintingPolarity] -> ShowS)
-> Show MintingPolarity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MintingPolarity] -> ShowS
$cshowList :: [MintingPolarity] -> ShowS
show :: MintingPolarity -> String
$cshow :: MintingPolarity -> String
showsPrec :: Int -> MintingPolarity -> ShowS
$cshowsPrec :: Int -> MintingPolarity -> ShowS
Haskell.Show)

PlutusTx.makeIsDataIndexed ''MintingPolarity [('Mint,0),('Burn,1)]

instance Eq MintingPolarity where
    MintingPolarity
Mint == :: MintingPolarity -> MintingPolarity -> Bool
== MintingPolarity
Mint = Bool
True
    MintingPolarity
Burn == MintingPolarity
Burn = Bool
True
    MintingPolarity
_ == MintingPolarity
_       = Bool
False