File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff 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)
You can’t perform that action at this time.
0 commit comments