You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inter-module access to reified definitions is a bit tricky. So far module interfaces are kept intact, including type signatures. Since reification produces a different type (reifyE :: a -> E p a), this constraint means that no reified definitions can be exported. Instead, we wrap a reified expression in a evalE call. The idea is to inline that definition elsewhere, in the context of applying reifyE, hoping that the reifyE/evalE rewrite rule will kick in. In order to reduce the amount of inlining required, there's a second trick. Split foo = evalE ... into foo_reified = ... and foo = evalE foo_reified. We need only inline this short foo definition to get the reifyE/evalE rule to fire.
I've been unable to get the required inlining and simplification to happen in a client module (i.e., one using a reified module), however, without specially handling that module as well.
The rewrite rule trick gives indirect access to the unexported foo_reified definitions via reifyE foo. Look for more robust alternatives.
The text was updated successfully, but these errors were encountered:
Inter-module access to reified definitions is a bit tricky. So far module interfaces are kept intact, including type signatures. Since reification produces a different type (
reifyE :: a -> E p a
), this constraint means that no reified definitions can be exported. Instead, we wrap a reified expression in aevalE
call. The idea is to inline that definition elsewhere, in the context of applyingreifyE
, hoping that thereifyE/evalE
rewrite rule will kick in. In order to reduce the amount of inlining required, there's a second trick. Splitfoo = evalE ...
intofoo_reified = ...
andfoo = evalE foo_reified
. We need only inline this shortfoo
definition to get thereifyE/evalE
rule to fire.I've been unable to get the required inlining and simplification to happen in a client module (i.e., one using a reified module), however, without specially handling that module as well.
The rewrite rule trick gives indirect access to the unexported
foo_reified
definitions viareifyE foo
. Look for more robust alternatives.The text was updated successfully, but these errors were encountered: