@@ -98,7 +98,7 @@ instance ( Convertible e t f m
9898instance Convertible e t f m
9999 => FromValue () m (NValue' t f m (NValue t f m )) where
100100 fromValueMay = \ case
101- NVConstant' NNull -> pure $ Just ()
101+ NVConstant' NNull -> pure $ pure ()
102102 _ -> pure Nothing
103103 fromValue v = fromValueMay v >>= \ case
104104 Just b -> pure b
@@ -107,7 +107,7 @@ instance Convertible e t f m
107107instance Convertible e t f m
108108 => FromValue Bool m (NValue' t f m (NValue t f m )) where
109109 fromValueMay = \ case
110- NVConstant' (NBool b) -> pure $ Just b
110+ NVConstant' (NBool b) -> pure $ pure b
111111 _ -> pure Nothing
112112 fromValue v = fromValueMay v >>= \ case
113113 Just b -> pure b
@@ -116,7 +116,7 @@ instance Convertible e t f m
116116instance Convertible e t f m
117117 => FromValue Int m (NValue' t f m (NValue t f m )) where
118118 fromValueMay = \ case
119- NVConstant' (NInt b) -> pure $ Just (fromInteger b)
119+ NVConstant' (NInt b) -> pure $ pure (fromInteger b)
120120 _ -> pure Nothing
121121 fromValue v = fromValueMay v >>= \ case
122122 Just b -> pure b
@@ -125,7 +125,7 @@ instance Convertible e t f m
125125instance Convertible e t f m
126126 => FromValue Integer m (NValue' t f m (NValue t f m )) where
127127 fromValueMay = \ case
128- NVConstant' (NInt b) -> pure $ Just b
128+ NVConstant' (NInt b) -> pure $ pure b
129129 _ -> pure Nothing
130130 fromValue v = fromValueMay v >>= \ case
131131 Just b -> pure b
@@ -134,8 +134,8 @@ instance Convertible e t f m
134134instance Convertible e t f m
135135 => FromValue Float m (NValue' t f m (NValue t f m )) where
136136 fromValueMay = \ case
137- NVConstant' (NFloat b) -> pure $ Just b
138- NVConstant' (NInt i) -> pure $ Just (fromInteger i)
137+ NVConstant' (NFloat b) -> pure $ pure b
138+ NVConstant' (NInt i) -> pure $ pure (fromInteger i)
139139 _ -> pure Nothing
140140 fromValue v = fromValueMay v >>= \ case
141141 Just b -> pure b
@@ -147,9 +147,9 @@ instance ( Convertible e t f m
147147 )
148148 => FromValue NixString m (NValue' t f m (NValue t f m )) where
149149 fromValueMay = \ case
150- NVStr' ns -> pure $ Just ns
150+ NVStr' ns -> pure $ pure ns
151151 NVPath' p ->
152- Just
152+ pure
153153 . (\ s -> makeNixStringWithSingletonContext s (StringContext s DirectPath ))
154154 . Text. pack
155155 . unStorePath
@@ -179,7 +179,7 @@ instance ( Convertible e t f m
179179 )
180180 => FromValue Path m (NValue' t f m (NValue t f m )) where
181181 fromValueMay = \ case
182- NVPath' p -> pure $ Just (Path p)
182+ NVPath' p -> pure $ pure (Path p)
183183 NVStr' ns -> pure $ Path . Text. unpack <$> getStringNoContext ns
184184 NVSet' s _ -> case M. lookup " outPath" s of
185185 Nothing -> pure Nothing
@@ -192,7 +192,7 @@ instance ( Convertible e t f m
192192instance Convertible e t f m
193193 => FromValue [NValue t f m ] m (NValue' t f m (NValue t f m )) where
194194 fromValueMay = \ case
195- NVList' l -> pure $ Just l
195+ NVList' l -> pure $ pure l
196196 _ -> pure Nothing
197197 fromValue v = fromValueMay v >>= \ case
198198 Just b -> pure b
@@ -212,7 +212,7 @@ instance ( Convertible e t f m
212212instance 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
215- NVSet' s _ -> pure $ Just s
215+ NVSet' s _ -> pure $ pure s
216216 _ -> pure Nothing
217217 fromValue v = fromValueMay v >>= \ case
218218 Just b -> pure b
@@ -233,7 +233,7 @@ instance Convertible e t f m
233233 => FromValue (AttrSet (NValue t f m ), AttrSet SourcePos ) m
234234 (NValue' t f m (NValue t f m )) where
235235 fromValueMay = \ case
236- NVSet' s p -> pure $ Just (s, p)
236+ NVSet' s p -> pure $ pure (s, p)
237237 _ -> pure Nothing
238238 fromValue v = fromValueMay v >>= \ case
239239 Just b -> pure b
@@ -352,17 +352,17 @@ instance (Convertible e t f m, ToValue a m (NValue t f m))
352352instance Convertible e t f m
353353 => ToValue NixLikeContextValue m (NValue' t f m (NValue t f m )) where
354354 toValue nlcv = do
355- path <- if nlcvPath nlcv then Just <$> toValue True else pure Nothing
355+ path <- if nlcvPath nlcv then pure <$> toValue True else pure Nothing
356356 allOutputs <- if nlcvAllOutputs nlcv
357- then Just <$> toValue True
357+ then pure <$> toValue True
358358 else pure Nothing
359359 outputs <- do
360360 let outputs =
361361 makeNixStringWithoutContext <$> nlcvOutputs nlcv
362362 ts :: [NValue t f m ] <- traverse toValue outputs
363363 case ts of
364364 [] -> pure Nothing
365- _ -> Just <$> toValue ts
365+ _ -> pure <$> toValue ts
366366 pure $ flip nvSet' M. empty $ M. fromList $ catMaybes
367367 [ (" path" ,) <$> path
368368 , (" allOutputs" ,) <$> allOutputs
0 commit comments