ЗП
Size: a a a
ЗП
ЗП
ЗП
R:
R:
VY
p
R:
p
p
p
VY
TypeEquals?VY
VY
type Env = { ... }
newtype AppM a = AppM (ReaderT Env Aff a)
runAppM ∷ Env → AppM ~> Aff
runAppM env (AppM m) = runReaderT m env
дальше я вижу такоеinstance monadAskAppM ∷ TypeEquals e Env => MonadAsk e AppM where
ask = AppM $ asks from
ЗП
~ свидетель приведенияVY
class TypeEquals a b | a -> b, b -> a whereи подписано:
to :: a -> b
from :: b -> a
instance refl :: TypeEquals a a where
to a = a
from a = a
Note: any instance will necessarily overlap with—
`refl` below, so instances of this class should
not be defined in libraries.
from :: e → Env
ask :: AppM e
asks :: MonadAsk e AppEnv => (e -> Env) -> AppM Env
VY