File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
test/Test/Codec/CBOR/Cuddle Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import GHC.Show (Show (show))
20
20
default (Integer , Double )
21
21
22
22
conway :: Huddle
23
- conway = collectFrom block
23
+ conway = collectFrom [ block]
24
24
25
25
block :: Rule
26
26
block =
Original file line number Diff line number Diff line change @@ -789,11 +789,11 @@ binding2 fRule t0 t1 =
789
789
--------------------------------------------------------------------------------
790
790
791
791
-- | Collect all rules starting from a given point.
792
- collectFrom :: Rule -> Huddle
793
- collectFrom topR =
792
+ collectFrom :: [ Rule ] -> Huddle
793
+ collectFrom topRs =
794
794
toHuddle $
795
795
execState
796
- (goRule topR )
796
+ (traverse goRule topRs )
797
797
(HaskMap. empty, HaskMap. empty, HaskMap. empty)
798
798
where
799
799
toHuddle (rules, groups, gRules) =
Original file line number Diff line number Diff line change @@ -105,10 +105,10 @@ genericSpec =
105
105
dict = binding2 $ \ k v -> " dict" =:= mp [0 <+ asKey k ==> v]
106
106
in do
107
107
it " Should bind a single parameter" $
108
- toCDDL (collectFrom ( " intset" =:= set VUInt ) )
108
+ toCDDL (collectFrom [ " intset" =:= set VUInt ] )
109
109
`shouldMatchParseCDDL` " intset = set<uint>\n set<a0> = [* a0]"
110
110
it " Should bind two parameters" $
111
- toCDDL (collectFrom ( " mymap" =:= dict VUInt VText ) )
111
+ toCDDL (collectFrom [ " mymap" =:= dict VUInt VText ] )
112
112
`shouldMatchParseCDDL` " mymap = dict<uint, text>\n dict<a0, b0> = {* a0 => b0}"
113
113
114
114
--------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments