git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Preserve newlines in embedded comments
6be7df9Phil Freeman
prelude/README.md+5
@@ -278,8 +278,11 @@
278
278
279This function returns its first argument, and can be used to assert type equalities.
279This function returns its first argument, and can be used to assert type equalities.
280This can be useful when types are otherwise ambiguous.
280This can be useful when types are otherwise ambiguous.
281+
281E.g.
282E.g.
283+
282 main = print $ [] `asTypeOf` [0]
284 main = print $ [] `asTypeOf` [0]
285+
283If instead, we had written `main = print []`, the type of the argument `[]` would have
286If instead, we had written `main = print []`, the type of the argument `[]` would have
284been ambiguous, resulting in a compile-time error.
287been ambiguous, resulting in a compile-time error.
285
288
@@ -312,7 +315,9 @@ Flips the order of the arguments to a function of two arguments.
312#### `otherwise`
315#### `otherwise`
313
316
314An alias for `true`, which can be useful in guard clauses:
317An alias for `true`, which can be useful in guard clauses:
318+
315E.g.
319E.g.
320+
316 max x y | x >= y = x
321 max x y | x >= y = x
317 | otherwise = y
322 | otherwise = y
318
323
psc-docs/Main.hs+2−2
@@ -183,8 +183,8 @@ renderComments cs = do
183 let raw = concatMap toLines cs
183 let raw = concatMap toLines cs
184
184
185 if all hasPipe raw
185 if all hasPipe raw
186− then mapM_ (atIndent 0) (map stripPipes raw)
186+ then atIndent 0 . unlines . map stripPipes $ raw
187− else mapM_ (atIndent 4) raw
187+ else atIndent 4 $ unlines raw
188
188
189 unless (null raw) spacer
189 unless (null raw) spacer
190 where
190 where