@@ -99,7 +99,7 @@ instance Convertible e t f m
9999 => FromValue () m (NValue' t f m (NValue t f m )) where
100100 fromValueMay = \ case
101101 NVConstant' NNull -> pure $ pure ()
102- _ -> pure Nothing
102+ _ -> pure mempty
103103 fromValue v = fromValueMay v >>= \ case
104104 Just b -> pure b
105105 _ -> throwError $ Expectation @ t @ f @ m TNull (Free v)
@@ -155,9 +155,9 @@ instance ( Convertible e t f m
155155 . unStorePath
156156 <$> addPath p
157157 NVSet' s _ -> case M. lookup " outPath" s of
158- Nothing -> pure Nothing
158+ Nothing -> pure mempty
159159 Just p -> fromValueMay p
160- _ -> pure Nothing
160+ _ -> pure mempty
161161 fromValue v = fromValueMay v >>= \ case
162162 Just b -> pure b
163163 _ -> throwError $ Expectation @ t @ f @ m (TString NoContext ) (Free v)
@@ -166,7 +166,7 @@ instance Convertible e t f m
166166 => FromValue ByteString m (NValue' t f m (NValue t f m )) where
167167 fromValueMay = \ case
168168 NVStr' ns -> pure $ encodeUtf8 <$> getStringNoContext ns
169- _ -> pure Nothing
169+ _ -> pure mempty
170170 fromValue v = fromValueMay v >>= \ case
171171 Just b -> pure b
172172 _ -> throwError $ Expectation @ t @ f @ m (TString NoContext ) (Free v)
@@ -193,7 +193,7 @@ instance Convertible e t f m
193193 => FromValue [NValue t f m ] m (NValue' t f m (NValue t f m )) where
194194 fromValueMay = \ case
195195 NVList' l -> pure $ pure l
196- _ -> pure Nothing
196+ _ -> pure mempty
197197 fromValue v = fromValueMay v >>= \ case
198198 Just b -> pure b
199199 _ -> throwError $ Expectation @ t @ f @ m TList (Free v)
@@ -204,7 +204,7 @@ instance ( Convertible e t f m
204204 => FromValue [a ] m (Deeper (NValue' t f m (NValue t f m ))) where
205205 fromValueMay = \ case
206206 Deeper (NVList' l) -> sequence <$> traverse fromValueMay l
207- _ -> pure Nothing
207+ _ -> pure mempty
208208 fromValue v = fromValueMay v >>= \ case
209209 Just b -> pure b
210210 _ -> throwError $ Expectation @ t @ f @ m TList (Free (getDeeper v))
@@ -213,7 +213,7 @@ instance Convertible e t f m
213213 => FromValue (AttrSet (NValue t f m )) m (NValue' t f m (NValue t f m )) where
214214 fromValueMay = \ case
215215 NVSet' s _ -> pure $ pure s
216- _ -> pure Nothing
216+ _ -> pure mempty
217217 fromValue v = fromValueMay v >>= \ case
218218 Just b -> pure b
219219 _ -> throwError $ Expectation @ t @ f @ m TSet (Free v)
@@ -224,7 +224,7 @@ instance ( Convertible e t f m
224224 => FromValue (AttrSet a ) m (Deeper (NValue' t f m (NValue t f m ))) where
225225 fromValueMay = \ case
226226 Deeper (NVSet' s _) -> sequence <$> traverse fromValueMay s
227- _ -> pure Nothing
227+ _ -> pure mempty
228228 fromValue v = fromValueMay v >>= \ case
229229 Just b -> pure b
230230 _ -> throwError $ Expectation @ t @ f @ m TSet (Free (getDeeper v))
@@ -234,7 +234,7 @@ instance Convertible e t f m
234234 (NValue' t f m (NValue t f m )) where
235235 fromValueMay = \ case
236236 NVSet' s p -> pure $ pure (s, p)
237- _ -> pure Nothing
237+ _ -> pure mempty
238238 fromValue v = fromValueMay v >>= \ case
239239 Just b -> pure b
240240 _ -> throwError $ Expectation @ t @ f @ m TSet (Free v)
@@ -246,7 +246,7 @@ instance ( Convertible e t f m
246246 (Deeper (NValue' t f m (NValue t f m ))) where
247247 fromValueMay = \ case
248248 Deeper (NVSet' s p) -> fmap (, p) . sequence <$> traverse fromValueMay s
249- _ -> pure Nothing
249+ _ -> pure mempty
250250 fromValue v = fromValueMay v >>= \ case
251251 Just b -> pure b
252252 _ -> throwError $ Expectation @ t @ f @ m TSet (Free (getDeeper v))
0 commit comments