Skip to content

Commit acf5913

Browse files
committed
Roll back to fourmolu 0.14.0.0
1 parent 7fe3abb commit acf5913

File tree

4 files changed

+78
-78
lines changed

4 files changed

+78
-78
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272

7373
- name: Install fourmolu
7474
run: |
75-
FOURMOLU_VERSION="0.18.0.0"
75+
FOURMOLU_VERSION="0.14.0.0"
7676
mkdir -p "$HOME/.local/bin"
7777
curl -sL "https://github.com/fourmolu/fourmolu/releases/download/v${FOURMOLU_VERSION}/fourmolu-${FOURMOLU_VERSION}-linux-x86_64" -o "$HOME/.local/bin/fourmolu"
7878
chmod a+x "$HOME/.local/bin/fourmolu"

src/Codec/CBOR/Cuddle/CBOR/Validator.hs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -658,25 +658,25 @@ flattenGroup :: CDDL -> [Rule] -> [Rule]
658658
flattenGroup cddl nodes =
659659
mconcat
660660
[ case resolveIfRef cddl rule of
661-
Literal {} -> [rule]
662-
Postlude {} -> [rule]
663-
Map {} -> [rule]
664-
Array {} -> [rule]
665-
Choice {} -> [rule]
666-
KV {} -> [rule]
667-
Occur {} -> [rule]
668-
Range {} -> [rule]
669-
Control {} -> [rule]
670-
Enum e -> case resolveIfRef cddl e of
671-
Group g -> flattenGroup cddl g
672-
_ -> error "Malformed cddl"
673-
Unwrap g -> case resolveIfRef cddl g of
674-
Map n -> flattenGroup cddl n
675-
Array n -> flattenGroup cddl n
676-
Tag _ n -> [n]
677-
_ -> error "Malformed cddl"
678-
Tag {} -> [rule]
661+
Literal {} -> [rule]
662+
Postlude {} -> [rule]
663+
Map {} -> [rule]
664+
Array {} -> [rule]
665+
Choice {} -> [rule]
666+
KV {} -> [rule]
667+
Occur {} -> [rule]
668+
Range {} -> [rule]
669+
Control {} -> [rule]
670+
Enum e -> case resolveIfRef cddl e of
679671
Group g -> flattenGroup cddl g
672+
_ -> error "Malformed cddl"
673+
Unwrap g -> case resolveIfRef cddl g of
674+
Map n -> flattenGroup cddl n
675+
Array n -> flattenGroup cddl n
676+
Tag _ n -> [n]
677+
_ -> error "Malformed cddl"
678+
Tag {} -> [rule]
679+
Group g -> flattenGroup cddl g
680680
| rule <- nodes
681681
]
682682

test/Test/Codec/CBOR/Cuddle/CDDL/Parser.hs

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -347,27 +347,27 @@ type2Spec = describe "type2" $ do
347347
, gcComment = Comment mempty
348348
}
349349
:| [ GrpChoice
350-
{ gcGroupEntries =
351-
[ GroupEntry
352-
{ geOccurrenceIndicator = Nothing
353-
, geComment = Comment mempty
354-
, geVariant =
355-
GEType
356-
Nothing
357-
( Type0
358-
{ t0Type1 =
359-
Type1
360-
{ t1Main = T2Name (Name {name = "string", nameComment = Comment mempty}) Nothing
361-
, t1TyOp = Nothing
362-
, t1Comment = Comment mempty
363-
}
364-
:| []
365-
}
366-
)
367-
}
368-
]
369-
, gcComment = Comment mempty
370-
}
350+
{ gcGroupEntries =
351+
[ GroupEntry
352+
{ geOccurrenceIndicator = Nothing
353+
, geComment = Comment mempty
354+
, geVariant =
355+
GEType
356+
Nothing
357+
( Type0
358+
{ t0Type1 =
359+
Type1
360+
{ t1Main = T2Name (Name {name = "string", nameComment = Comment mempty}) Nothing
361+
, t1TyOp = Nothing
362+
, t1Comment = Comment mempty
363+
}
364+
:| []
365+
}
366+
)
367+
}
368+
]
369+
, gcComment = Comment mempty
370+
}
371371
]
372372
}
373373
)
@@ -395,22 +395,22 @@ type2Spec = describe "type2" $ do
395395
, gcComment = Comment mempty
396396
}
397397
:| [ GrpChoice
398-
{ gcGroupEntries =
399-
[ GroupEntry
400-
{ geOccurrenceIndicator = Nothing
401-
, geComment = Comment mempty
402-
, geVariant =
403-
GEType
404-
Nothing
405-
( Type0
406-
{ t0Type1 =
407-
Type1 {t1Main = T2Value (value $ VUInt 1), t1TyOp = Nothing, t1Comment = Comment mempty} :| []
408-
}
409-
)
410-
}
411-
]
412-
, gcComment = Comment mempty
413-
}
398+
{ gcGroupEntries =
399+
[ GroupEntry
400+
{ geOccurrenceIndicator = Nothing
401+
, geComment = Comment mempty
402+
, geVariant =
403+
GEType
404+
Nothing
405+
( Type0
406+
{ t0Type1 =
407+
Type1 {t1Main = T2Value (value $ VUInt 1), t1TyOp = Nothing, t1Comment = Comment mempty} :| []
408+
}
409+
)
410+
}
411+
]
412+
, gcComment = Comment mempty
413+
}
414414
]
415415
}
416416
)

test/Test/Codec/CBOR/Cuddle/CDDL/Pretty.hs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -86,30 +86,30 @@ drep =
8686
]
8787
mempty
8888
:| [ GrpChoice
89-
[ GroupEntry
90-
Nothing
91-
mempty
92-
(GEType Nothing (Type0 $ Type1 (T2Value . value $ VUInt 1) Nothing mempty :| []))
93-
, GroupEntry
94-
Nothing
95-
mempty
96-
(GEType Nothing (Type0 $ Type1 (T2Name "script_hash" Nothing) Nothing mempty :| []))
97-
]
98-
mempty
89+
[ GroupEntry
90+
Nothing
91+
mempty
92+
(GEType Nothing (Type0 $ Type1 (T2Value . value $ VUInt 1) Nothing mempty :| []))
93+
, GroupEntry
94+
Nothing
95+
mempty
96+
(GEType Nothing (Type0 $ Type1 (T2Name "script_hash" Nothing) Nothing mempty :| []))
97+
]
98+
mempty
9999
, GrpChoice
100-
[ GroupEntry
101-
Nothing
102-
mempty
103-
(GEType Nothing (Type0 $ Type1 (T2Value . value $ VUInt 2) Nothing mempty :| []))
104-
]
105-
mempty
100+
[ GroupEntry
101+
Nothing
102+
mempty
103+
(GEType Nothing (Type0 $ Type1 (T2Value . value $ VUInt 2) Nothing mempty :| []))
104+
]
105+
mempty
106106
, GrpChoice
107-
[ GroupEntry
108-
Nothing
109-
mempty
110-
(GEType Nothing (Type0 $ Type1 (T2Value . value $ VUInt 3) Nothing mempty :| []))
111-
]
112-
mempty
107+
[ GroupEntry
108+
Nothing
109+
mempty
110+
(GEType Nothing (Type0 $ Type1 (T2Value . value $ VUInt 3) Nothing mempty :| []))
111+
]
112+
mempty
113113
]
114114
)
115115
)

0 commit comments

Comments
 (0)