1 -- | Interpreter to compute a host-term.
2 module Language.Symantic.Interpreting.Host where
8 -- | Interpreter's data.
9 newtype HostI h = HostI { unHostI :: h }
10 instance Functor HostI where
11 fmap f (HostI a) = HostI (f a)
12 instance Applicative HostI where
14 (HostI f) <*> (HostI a) = HostI (f a)
15 instance Monad HostI where
20 host_from_term :: HostI h -> h
21 host_from_term = unHostI
23 hostI0 :: a -> HostI a
26 hostI1 :: (a -> b) -> HostI a -> HostI b
29 hostI2 :: (a -> b -> c) -> HostI a -> HostI b -> HostI c
32 hostI3 :: (a -> b -> c -> d) -> HostI a -> HostI b -> HostI c -> HostI d