mirror of
https://github.com/ilyakooo0/ormolu.git
synced 2024-09-11 16:36:31 +03:00
Fix non-idempotent transformation of partly documented data definition
This commit is contained in:
parent
b0092e11a1
commit
1fb65a218c
@ -32,6 +32,9 @@
|
||||
syntax. [Issue 445](https://github.com/tweag/ormolu/issues/445) and [Issue
|
||||
428](https://github.com/tweag/ormolu/issues/428).
|
||||
|
||||
* Fixed non-idempotent transformation of partly documented data definition.
|
||||
[Issue 590](https://github.com/tweag/ormolu/issues/590).
|
||||
|
||||
* Renamed the `--check-idempotency` flag to `--check-idempotence`.
|
||||
Apparently only the latter is correct.
|
||||
|
||||
|
5
data/examples/declaration/data/partly-documented-out.hs
Normal file
5
data/examples/declaration/data/partly-documented-out.hs
Normal file
@ -0,0 +1,5 @@
|
||||
data Optimisation
|
||||
= PETransform
|
||||
| -- | partial eval and associated transforms
|
||||
GeneralisedNatHack
|
||||
deriving (Show, Eq, Generic)
|
2
data/examples/declaration/data/partly-documented.hs
Normal file
2
data/examples/declaration/data/partly-documented.hs
Normal file
@ -0,0 +1,2 @@
|
||||
data Optimisation = PETransform | GeneralisedNatHack -- ^ partial eval and associated transforms
|
||||
deriving (Show, Eq, Generic)
|
@ -10,12 +10,6 @@ Formatting is not idempotent:
|
||||
after: " text op\n <"
|
||||
Please, consider reporting the bug.
|
||||
|
||||
Formatting is not idempotent:
|
||||
src/Idris/Options.hs<rendered>:178:15
|
||||
before: "ETransform | -- | pa"
|
||||
after: "ETransform\n | -- | "
|
||||
Please, consider reporting the bug.
|
||||
|
||||
The GHC parser (in Haddock mode) failed:
|
||||
src/Idris/Parser.hs:1052:1
|
||||
parse error on input `@'
|
||||
|
@ -72,10 +72,11 @@ p_dataDecl style name tpats fixity HsDataDefn {..} = do
|
||||
else breakpoint
|
||||
equals
|
||||
space
|
||||
layout <- getLayout
|
||||
let s =
|
||||
vlayout
|
||||
(space >> txt "|" >> space)
|
||||
(newline >> txt "|" >> space)
|
||||
if layout == MultiLine || hasHaddocks dd_cons
|
||||
then newline >> txt "|" >> space
|
||||
else space >> txt "|" >> space
|
||||
sitcc' =
|
||||
if singleConstRec
|
||||
then id
|
||||
|
Loading…
Reference in New Issue
Block a user