Skip to content

Commit d5f9976

Browse files
committed
Nix/Exec: note to the instance MonadEval NValue
1 parent 1aa5b35 commit d5f9976

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
@@ -152,6 +152,8 @@ currentPos = asks (view hasLens)
152152
wrapExprLoc :: SrcSpan -> NExprLocF r -> NExprLoc
153153
wrapExprLoc span x = Fix (Fix (NSym_ span "<?>") <$ x)
154154

155+
-- 2021-01-07: NOTE: This instance belongs to be beside MonadEval type class.
156+
-- 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`.
155157
instance MonadNix e t f m => MonadEval (NValue t f m) m where
156158
freeVariable var =
157159
nverr @e @t @f

0 commit comments

Comments
 (0)