@@ -60,11 +60,11 @@ Haskell is a language that is older than some of the people currently writing
6060it; parts of its ecosystem are not exempt from it. With age comes legacy, and
6161much of it is based on historical decisions which we now know to be problematic
6262or wrong. We can't avoid our history, but we can minimize its impact on our
63- current work.
63+ current work.
6464
6565Thus, we aim to codify good practices in this document _ as seen today_ . We also
6666try to avoid obvious 'sharp edges' by proscribing them away in a principled,
67- consistent and justifiable manner.
67+ consistent and justifiable manner.
6868
6969## Automate away drudgery
7070
@@ -155,7 +155,7 @@ difficult to read even without a split screen. We don't _enforce_ a maximum of
155155## Naming
156156
157157camelCase MUST be used for all non-type, non-data-constructor names; otherwise,
158- TitleCase MUST be used. Acronyms used as part of a naming identifier (such as
158+ TitleCase MUST be used. Acronyms used as part of a naming identifier (such as
159159'JSON', 'API', etc) SHOULD be downcased; thus `` repairJson `` and
160160`` fromHttpService `` are correct. Exceptions are allowed for external libraries
161161(Aeson's `` parseJSON `` for example).
@@ -315,11 +315,11 @@ wrappers around monadic stacks:
315315```haskell
316316newtype FooM a = FooM (ReaderT Int (StateT Text IO ) a )
317317 deriving newtype (
318- Functor ,
319- Applicative ,
320- Monad ,
321- MonadReader Int ,
322- MonadState Text ,
318+ Functor ,
319+ Applicative ,
320+ Monad ,
321+ MonadReader Int ,
322+ MonadState Text ,
323323 MonadIO
324324 )
325325```
@@ -341,8 +341,8 @@ Thus, even for popularity and compatibility reasons, these should be on by
341341default .
342342
343343``InstanceSigs `` are harmless by default , and introduce no complications. Their
344- not being default is strange. ``ImportQualifiedPost `` is already a convention
345- of this project, and helps with formatting of imports.
344+ not being default is strange. ``ImportQualifiedPost `` is already a convention
345+ of this project, and helps with formatting of imports.
346346
347347``LambdaCase `` reduces a lot of code in the common case of analysis of sum
348348types. Without it, we are forced to either write a dummy ``case` ` argument:
@@ -383,7 +383,7 @@ instead of the one from ``base``.
383383`` OverloadedStrings `` deals with the problem that `` String `` is a suboptimal
384384choice of string representation for basically _ any_ problem, with the general
385385recommendation being to use `` Text `` instead. It is not, however, without its
386- problems:
386+ problems:
387387
388388* `` ByteString `` s are treated as ASCII strings by their `` IsString `` instance;
389389* Overly polymorphic behaviour of many functions (especially in the presence of
@@ -438,8 +438,8 @@ alternatives. This means that, when a non-``base`` ``Prelude`` is in scope, it
438438often requires familiarity with its specific decisions, in addition to whatever
439439cognitive load the current module and its other imports impose. Given that we
440440already use an alternative prelude (in tandem with the one from `` base `` ),
441- additional alternatives present an unnecessary cognitive load. Lastly, the
442- dependency footprint of many alternative `` Prelude `` s is _ highly_ non-trivial;
441+ additional alternatives present an unnecessary cognitive load. Lastly, the
442+ dependency footprint of many alternative `` Prelude `` s is _ highly_ non-trivial;
443443it isn't clear if we need all of this in our dependency tree.
444444
445445For all of the above reasons, the best choice is 'default to Plutus, with local
@@ -470,7 +470,7 @@ Every publically-exported definition MUST have a Haddock comment, detailing its
470470purpose. If a definition is a function, it SHOULD also have examples of use
471471using [ Bird tracks] [ bird-tracks ] . The Haddock for a publically-exported
472472definition SHOULD also provide an explanation of any caveats, complexities of
473- its use, or common issues a user is likely to encounter.
473+ its use, or common issues a user is likely to encounter.
474474
475475If the code project is a library, these Haddock comments SHOULD carry an
476476[ `` @since `` ] [ haddock-since ] annotation, stating what version of the library they
@@ -502,15 +502,15 @@ also the expected behaviour of its instances.
502502## Other
503503
504504Lists SHOULD NOT be field values of types; this extends to `` String `` s. Instead,
505- `` Vector `` s (`` Text `` s) SHOULD be used, unless a more appropriate structure exists.
505+ `` Vector `` s (`` Text `` s) SHOULD be used, unless a more appropriate structure exists.
506506On-chain code, due to a lack of alternatives, is one place lists can be used as
507507field values of types.
508508
509509Partial functions MUST NOT be defined. Partial functions SHOULD NOT be used
510510except to ensure that another function is total (and the type system cannot be
511- used to prove it).
511+ used to prove it).
512512
513- Derivations MUST use an explicit [ strategy] [ deriving-strategies ] . Thus, the
513+ Derivations MUST use an explicit [ strategy] [ deriving-strategies ] . Thus, the
514514following is wrong:
515515
516516``` haskell
0 commit comments