-- | Interpreter to compute a host-term.
module Language.Symantic.Interpreting.Host where

-- * Type 'HostI'

-- | Interpreter's data.
newtype HostI h = HostI { unHostI :: h }
instance Functor HostI where
	fmap f (HostI a) = HostI (f a)
instance Applicative HostI where
	pure = HostI
	(HostI f) <*> (HostI a) = HostI (f a)
instance Monad HostI where
	return = HostI
	(HostI a) >>= f = f a

-- | Interpreter.
host_from_term :: HostI h -> h
host_from_term = unHostI