Skip to content

Commit dc6374b

Browse files
docs(generic): update Data.Generic.Rep link (#386)
* docs(generic): update Data.Generic.Rep link Point `Data.Generic.Rep` from the [deprecated link](https://pursuit.purescript.org/packages/purescript-generics-rep/6.1.4/docs/Data.Generic.Rep#t:Generic) to the [new link](https://pursuit.purescript.org/packages/purescript-prelude/5.0.0/docs/Data.Generic.Rep#t:Generic) Also forgot to change `genericShow` reference from last pull request #385: ```purescript #+begin_src purescript import Data.Generic.Rep (class Generic) import Data.Show.Generic (genericShow) -- import Data.Generic.Rep.Show (genericShow) import Effect.Console (logShow) :paste data MyADT = Some | Arbitrary Int | Contents Number String derive instance genericMyADT :: Generic MyADT _ instance showMyADT :: Show MyADT where show = genericShow main = logShow [Some, Arbitrary 1, Contents 2.0 "Three"] #+end_src #+RESULTS: : PSCi, version 0.14.0 : Type :? for help : : import Prelude : : > > > > > > … … … … … … … … … … … … … > See ya! : () ``` * Update guides/Type-Class-Deriving.md Co-authored-by: milesfrain <[email protected]> Co-authored-by: milesfrain <[email protected]>
1 parent 3bc7a0e commit dc6374b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

guides/Type-Class-Deriving.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ nub [Some, Arbitrary 1, Some, Some] == [Some, Arbitrary 1]
2323
```
2424

2525
Currently, instances for the following classes can be derived by the compiler:
26-
- [Data.Generic.Rep (class Generic)](https://pursuit.purescript.org/packages/purescript-generics-rep/docs/Data.Generic.Rep#t:Generic)
26+
- [Data.Generic.Rep (class Generic)](https://pursuit.purescript.org/packages/purescript-prelude/docs/Data.Generic.Rep#t:Generic)
2727
- [Data.Eq (class Eq)](https://pursuit.purescript.org/packages/purescript-prelude/docs/Data.Eq#t:Eq)
2828
- [Data.Ord (class Ord)](https://pursuit.purescript.org/packages/purescript-prelude/docs/Data.Ord#t:Ord)
2929
- [Data.Functor (class Functor)](https://pursuit.purescript.org/packages/purescript-prelude/docs/Data.Functor#t:Functor)
@@ -72,7 +72,7 @@ But we _can_ use `genericShow`, which works with _any_ type that has a `Generic`
7272

7373
```purescript
7474
import Data.Generic.Rep (class Generic)
75-
import Data.Generic.Rep.Show (genericShow)
75+
import Data.Show.Generic (genericShow)
7676
import Effect.Console (logShow)
7777
7878
derive instance genericMyADT :: Generic MyADT _
@@ -155,4 +155,3 @@ instance showChain :: Show a => Show (Chain a) where
155155
```
156156

157157
This technique of undoing point free notation is known as _eta expansion_.
158-

0 commit comments

Comments
 (0)