on master help sign in
Add a "Type variable ordering" section in dev docs
de14835Adithya Kumar
CONTRIBUTING.md+13
@@ -199,6 +199,19 @@ For general library developer documentation see the `dev` directory.
199
199
200Please see [the Haskell coding style guide](https://github.com/composewell/haskell-dev/blob/master/coding-style.rst).
200Please see [the Haskell coding style guide](https://github.com/composewell/haskell-dev/blob/master/coding-style.rst).
201
201
202+### Type variable ordering
203+
204+Ordering of variables in `forall` may be important in type applications. In
205+streams, we usually declare them in this order `t m a`.
206+
207+Use the same order in constraints as well
208+
209+Example,
210+
211+```
212+func :: forall m a. (MonadIO m, Storable a) => ...
213+```
214+
202### StreamD coding style
215### StreamD coding style
203
216
204Some conventions that we follow in the StreamD code are illustrated by the
217Some conventions that we follow in the StreamD code are illustrated by the