File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ import Text.Regex.TDFA ( Regex
9494
9595-- ** Nix Builtins Haskell type level
9696
97- newtype Prim m a = Prim { runPrim :: m a }
97+ newtype Prim m a = Prim ( m a )
9898
9999data BuiltinType = Normal | TopLevel
100100data Builtin v =
@@ -114,7 +114,7 @@ instance
114114 , ToValue a m (NValue t f m )
115115 )
116116 => ToBuiltin t f m (Prim m a ) where
117- toBuiltin _ p = toValue =<< runPrim p
117+ toBuiltin _ p = toValue @ a @ m =<< coerce p
118118
119119instance
120120 ( MonadNix e t f m
@@ -1407,12 +1407,12 @@ hashStringNix nsAlgo ns =
14071407 mkHash s = hash $ encodeUtf8 s
14081408
14091409
1410- placeHolderNix :: MonadNix e t f m => NValue t f m -> m (NValue t f m )
1410+ placeHolderNix :: forall t f m e . MonadNix e t f m => NValue t f m -> m (NValue t f m )
14111411placeHolderNix p =
14121412 do
14131413 t <- fromStringNoContext =<< fromValue p
14141414 h <-
1415- runPrim $
1415+ coerce @ ( Prim m NixString ) @ ( m NixString ) $
14161416 (hashStringNix `on` makeNixStringWithoutContext)
14171417 " sha256"
14181418 (" nix-output:" <> t)
You can’t perform that action at this time.
0 commit comments