module ADP.Fusion.Term.Singleton.Type where
import Data.Strict.Tuple
import Data.PrimitiveArray
import ADP.Fusion.Term.Edge.Type (To(..))
import ADP.Fusion.Core.Classes
import ADP.Fusion.Core.Multi
data Singleton = Singleton
instance Build Singleton
instance
( Element ls i
) => Element (ls :!: Singleton) i where
data Elm (ls :!: Singleton) i = ElmSingleton !(Int:.To) !(RunningIndex i) (Elm ls i)
type Arg (ls :!: Singleton) = Arg ls :. (Int:.To)
getArg (ElmSingleton v _ ls) = getArg ls :. v
getIdx (ElmSingleton _ i _ ) = i
deriving instance (Show i, Show (RunningIndex i), Show (Elm ls i)) => Show (Elm (ls :!: Singleton) i)
type instance TermArg Singleton = (Int:.To)