Skip to content

Commit bd88680

Browse files
committed
fix CoRec test for match
1 parent abfd8b4 commit bd88680

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Data/Vinyl/CoRec.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,12 @@ asA' f@(CoRec x)
202202
-- | Pattern match on a CoRec by specifying handlers for each case. Note that
203203
-- the order of the Handlers has to match the type level list (t:ts).
204204
--
205+
-- >>> :set -XDataKinds
206+
-- >>> import Data.Vinyl.Core ( Rec((:&), RNil))
207+
-- >>> import Data.Vinyl.Functor (Identity(Identity))
208+
-- >>> import Data.Vinyl.CoRec (CoRec(CoRec), match, Handler(H))
205209
-- >>> :{
206-
-- let testCoRec = Col (Identity False) :: CoRec Identity [Int, String, Bool] in
210+
-- let testCoRec = CoRec (Identity False) :: CoRec Identity [Int, String, Bool] in
207211
-- match testCoRec $
208212
-- (H $ \i -> "my Int is the successor of " ++ show (i - 1))
209213
-- :& (H $ \s -> "my String is: " ++ s)

0 commit comments

Comments
 (0)