File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ prettyParams :: Params (NixDoc ann) -> Doc ann
155155prettyParams (Param n ) = prettyVarName n
156156prettyParams (ParamSet mname variadic pset) =
157157 prettyParamSet variadic pset <>
158- toDoc `whenJust` mname
158+ toDoc `whenJust` mname
159159 where
160160 toDoc :: VarName -> Doc ann
161161 toDoc (coerce -> name) =
@@ -166,18 +166,12 @@ prettyParamSet variadic args =
166166 encloseSep
167167 " { "
168168 (align " }" )
169- sep
169+ (align " , " )
170170 (fmap prettySetArg args <> one " ..." `whenTrue` (variadic == Variadic ))
171171 where
172172 prettySetArg :: (VarName , Maybe (NixDoc ann )) -> Doc ann
173173 prettySetArg (n, maybeDef) =
174- maybe
175- varName
176- (\ x -> varName <> " ? " <> getDoc x)
177- maybeDef
178- where
179- varName = prettyVarName n
180- sep = align " , "
174+ (prettyVarName n <> ) $ ((" ? " <> ) . getDoc) `whenJust` maybeDef
181175
182176prettyBind :: Binding (NixDoc ann ) -> Doc ann
183177prettyBind (NamedVar n v _p) =
You can’t perform that action at this time.
0 commit comments