Skip to content

Commit

Permalink
Fix doc leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
hsyl20 committed Aug 30, 2024
1 parent a493e6e commit ee0ba47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
14 changes: 6 additions & 8 deletions doc/manual/src/stdlib/eadt.typ
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ The same example with EADTs would be written as follows. First we define the
EADTs:

```haskell
import Haskus.Utils.EADT
import Haskus.Utils.EADT.TH
import Haskus.Data.Variant.EADT
import Haskus.Data.Variant.EADT.TH

data LambdaF n e = LambdaF n e deriving Functor
data VarF n e = VarF n deriving Functor
Expand Down Expand Up @@ -161,15 +161,13 @@ sampleAnn = Ann "Double its input" (liftEADT sampleDouble)

=== EADT basics <eadt-basics>

EADTs can be found in the
#link("https://hackage.haskell.org/package/haskus-utils-variant")[haskus-utils-variant]
package.
EADTs can be found in the `haskus-base` package.

You need the following imports in your source:

```haskell
import Haskus.Utils.EADT
import Haskus.Utils.EADT.TH -- template-haskell helpers
import Haskus.Data.Variant.EADT
import Haskus.Data.Variant.EADT.TH -- template-haskell helpers
```

==== Defining constructors
Expand Down Expand Up @@ -214,7 +212,7 @@ with:
```haskell
{-# LANGUAGE TemplateHaskell #-}

import Haskus.Utils.EADT.TH
import Haskus.Data.Variant.EADT.TH

eadtPattern 'ConsF "Cons"
eadtPattern 'NilF "Nil"
Expand Down
4 changes: 1 addition & 3 deletions doc/manual/src/stdlib/variant.typ
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ value.

To use `Variant`:

- add a dependency to the
#link("https://hackage.haskell.org/package/haskus-utils-variant")[haskus-utils-variant]>
package
- add a dependency to the `haskus-base` package
- use the following import: `import Haskus.Data.Variant`

You may need to enable some language extensions:
Expand Down

0 comments on commit ee0ba47

Please sign in to comment.