]> Git — Sourcephile - haskell/symantic.git/blob - symantic/Language/Symantic/Interpreting/Host.hs
Add GNUmakefile rule : tag.
[haskell/symantic.git] / symantic / Language / Symantic / Interpreting / Host.hs
1 -- | Interpreter to compute a host-term.
2 module Language.Symantic.Interpreting.Host where
3
4 -- * Type 'HostI'
5
6 -- | Interpreter's data.
7 newtype HostI h = HostI { unHostI :: h }
8 instance Functor HostI where
9 fmap f (HostI a) = HostI (f a)
10 instance Applicative HostI where
11 pure = HostI
12 (HostI f) <*> (HostI a) = HostI (f a)
13 instance Monad HostI where
14 return = HostI
15 (HostI a) >>= f = f a
16
17 -- | Interpreter.
18 host_from_term :: HostI h -> h
19 host_from_term = unHostI