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
Moved function got some alteration. Reduced Lazy -> Strict marchalling.
Also instead of Lazy used Strict data types, since on the conveyor that data
seems to be consumed fully (which I may be wrong about).
cataPM f x = f x <=<traverse (cataPM f) . unFix $ x
123
-
125
+
-- 2021-08-21: NOTE: Someone needs to put in normal words, what this does.
126
+
-- This function is pretty spefic & used only once, in "Nix.Normal".
124
127
lifted
125
128
:: (MonadTransControlu, Monad (um), Monadm)
126
129
=> ((a->m (StTub)) ->m (StTub))
@@ -131,29 +134,12 @@ lifted f k =
131
134
lftd <- liftWith (\run -> f (run . k))
132
135
restoreT $pure lftd
133
136
134
-
--| Replace:
135
-
-- @Pure a -> a@
136
-
-- @Free -> Fix@
137
-
freeToFix::Functorf=> (a->Fixf) ->Freefa->Fixf
138
-
freeToFix f = go
139
-
where
140
-
go =
141
-
free
142
-
f
143
-
$Fix. (go <$>)
144
-
145
-
--| Replace:
146
-
-- @a -> Pure a@
147
-
-- @Fix -> Free@
148
-
fixToFree::Functorf=>Fixf->Freefa
149
-
fixToFree =Free. go
150
-
where
151
-
go (Fix f) =Free. go <$> f
152
-
153
137
--| adi is Abstracting Definitional Interpreters:
154
138
--
155
139
-- https://arxiv.org/abs/1707.04755
156
140
--
141
+
-- All ADI does is interleaves every layer of evaluation by inserting intermitten layers between them, in that way the evaluation can be extended/embelished in any way wanted. Look at its use to see great examples.
142
+
--
157
143
-- Essentially, it does for evaluation what recursion schemes do for
158
144
-- representation: allows threading layers through existing structure, only
0 commit comments