Skip to content

Commit abf31b9

Browse files
ruifengxShimuuar
authored andcommitted
Fix the documentation for UnboxViaPrim
1 parent 21e2a20 commit abf31b9

File tree

1 file changed

+5
-5
lines changed
  • vector/src/Data/Vector/Unboxed

1 file changed

+5
-5
lines changed

vector/src/Data/Vector/Unboxed/Base.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ instance G.Vector Vector () where
188188
-- >>>
189189
-- >>> newtype Foo = Foo Int deriving VP.Prim
190190
-- >>>
191-
-- >>> newtype instance VU.MVector s Foo = MV_Int (VP.MVector s Foo)
192-
-- >>> newtype instance VU.Vector Foo = V_Int (VP.Vector Foo)
191+
-- >>> newtype instance VU.MVector s Foo = MV_Foo (VP.MVector s Foo)
192+
-- >>> newtype instance VU.Vector Foo = V_Foo (VP.Vector Foo)
193193
-- >>> deriving via (VU.UnboxViaPrim Foo) instance VGM.MVector VU.MVector Foo
194194
-- >>> deriving via (VU.UnboxViaPrim Foo) instance VG.Vector VU.Vector Foo
195195
-- >>> instance VU.Unbox Foo
196196
--
197197
-- Second example is essentially same but with a twist. Instead of
198-
-- using @Prim@ instance of data type, we use underlying instance of @Int@:
198+
-- using 'P.Prim' instance of data type, we use underlying instance of 'Int':
199199
--
200200
-- >>> :set -XTypeFamilies -XStandaloneDeriving -XDerivingVia -XMultiParamTypeClasses
201201
-- >>>
@@ -206,8 +206,8 @@ instance G.Vector Vector () where
206206
-- >>>
207207
-- >>> newtype Foo = Foo Int
208208
-- >>>
209-
-- >>> newtype instance VU.MVector s Foo = MV_Int (VP.MVector s Int)
210-
-- >>> newtype instance VU.Vector Foo = V_Int (VP.Vector Int)
209+
-- >>> newtype instance VU.MVector s Foo = MV_Foo (VP.MVector s Int)
210+
-- >>> newtype instance VU.Vector Foo = V_Foo (VP.Vector Int)
211211
-- >>> deriving via (VU.UnboxViaPrim Int) instance VGM.MVector VU.MVector Foo
212212
-- >>> deriving via (VU.UnboxViaPrim Int) instance VG.Vector VU.Vector Foo
213213
-- >>> instance VU.Unbox Foo

0 commit comments

Comments
 (0)