Skip to content

Commit eef8e77

Browse files
author
Divesh Otwani
authored
Merge pull request #285 from tweag/user-guide-import-conventions
Import conventions for Data, Control
2 parents 601b296 + 57a3822 commit eef8e77

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/USER_GUIDE.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,17 @@ Interfacing linear code with regular Haskell is done, for instance, through the
5252
The data type `Ur`, short for _unrestricted_ lets you store an
5353
unrestricted value inside a linear value.
5454

55+
### Import Conventions
56+
57+
We've designed `linear-base` to work nicely with the following import conventions:
58+
59+
- `import qualified Data.Functor.Linear as Data`
60+
- `import qualified Control.Functor.Linear as Control`
61+
5562
### Importing linear and non-linear code
5663

5764
Most modules with `{-# LANGUAGE LinearHaskell #-}` will want to have a mix of
58-
linear and non-linear code and hence, import linear modules like
65+
linear and non-linear code and, for example, import linear modules like
5966
`Data.Functor.Linear` and unrestricted modules from `base` like `Data.List`.
6067
The pattern we've followed internally is to import the non-linear module
6168
qualified. For instance:

0 commit comments

Comments
 (0)