Skip to content

Commit 011887b

Browse files
committed
Standard: m refactor
1 parent 3727056 commit 011887b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/Nix/Standard.hs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,12 @@ instance
271271
-- withFrame Debug (ForcingThunk @t @f @m) . withFrame Debug frame
272272

273273
newtype StandardTF r m a
274-
= StandardTF (ReaderT (Context r (StdValue r))
275-
(StateT (HashMap FilePath NExprLoc, HashMap Text Text) m) a)
274+
= StandardTF
275+
(ReaderT
276+
(Context r (StdValue r))
277+
(StateT (HashMap FilePath NExprLoc, HashMap Text Text) m)
278+
a
279+
)
276280
deriving
277281
( Functor
278282
, Applicative
@@ -316,25 +320,25 @@ instance MonadTrans (Fix1T StandardTF) where
316320
lift = Fix1T . lift
317321

318322
instance MonadThunkId m
319-
=> MonadThunkId (Fix1T StandardTF m) where
323+
=> MonadThunkId (StandardT m) where
320324

321-
type ThunkId (Fix1T StandardTF m) = ThunkId m
325+
type ThunkId (StandardT m) = ThunkId m
322326

323327
mkStandardT
324328
:: ReaderT
325329
(Context (StandardT m) (StdValue (StandardT m)))
326330
(StateT (HashMap FilePath NExprLoc, HashMap Text Text) m)
327331
a
328332
-> StandardT m a
329-
mkStandardT = Fix1T . StandardTF
333+
mkStandardT = coerce
330334

331335
runStandardT
332336
:: StandardT m a
333337
-> ReaderT
334338
(Context (StandardT m) (StdValue (StandardT m)))
335339
(StateT (HashMap FilePath NExprLoc, HashMap Text Text) m)
336340
a
337-
runStandardT (Fix1T (StandardTF m)) = m
341+
runStandardT = coerce
338342

339343
runWithBasicEffects
340344
:: (MonadIO m, MonadAtomicRef m)

0 commit comments

Comments
 (0)