Skip to content

Commit 0250459

Browse files
committed
add example for rappend
1 parent 2a623d9 commit 0250459

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Data/Vinyl/Core.hs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,16 @@ instance TestCoercion f => TestCoercion (Rec f) where
108108
Just Coercion
109109
testCoercion _ _ = Nothing
110110

111-
-- | Two records may be pasted together.
111+
{- |
112+
Two records may be pasted together.
113+
114+
>>> :set -XScopedTypeVariables
115+
>>> testRec1 :: Rec Maybe '[Int, String] = Just 3 :& Just "Hi" :& RNil
116+
>>> testRec2 :: Rec Maybe '[Double, [Double]] = Nothing :& Just [3.0, 2.2] :& RNil
117+
>>> appendedTestRec = rappend testRec1 testRec2
118+
>>> :t appendedTestRec
119+
appendedTestRec :: Rec Maybe '[Int, [Char], Double, [Double]]
120+
-}
112121
rappend
113122
:: Rec f as
114123
-> Rec f bs

0 commit comments

Comments
 (0)