Skip to content

Commit fb30e84

Browse files
committed
Nix/Exec: note to the instance MonadEval NValue
1 parent 643ec1e commit fb30e84

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Nix/Exec.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ currentPos = asks (view hasLens)
154154
wrapExprLoc :: SrcSpan -> NExprLocF r -> NExprLoc
155155
wrapExprLoc span x = Fix (Fix (NSym_ span "<?>") <$ x)
156156

157+
-- 2021-01-07: NOTE: This instance belongs to be beside MonadEval type class.
158+
-- Currently instance is stuck in orphanage between the requirements to be MonadEval, aka Eval stage, and emposed requirement to be MonadNix (Execution stage). MonadNix constraint tries to put the cart before horse and seems superflous, since Eval in Nix also needs and can throw exceptions. It is between `nverr` and `evalError`.
157159
instance MonadNix e t f m => MonadEval (NValue t f m) m where
158160
freeVariable var =
159161
nverr @e @t @f

0 commit comments

Comments
 (0)