IntersectMBO / IntersectMBO/cardano-ledger
Consistent qualified imports
- Dominant language
- Haskell
- Stars
- 295
- Forks
- 179
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 29
Description
## Text
It is more consistent to import `Text` qualified as `T`, instead of `Text`, so we should make it consistent and switch all `Data.Text*` occurnaces to `as T`:
```
[nix-shell:~/iohk/cardano-ledger]$ git grep "import qualified Data.Text as Text$" | wc -l
14
[nix-shell:~/iohk/cardano-ledger]$ git grep "import qualified Data.Text as T$" | wc -l
49
```
## ByteString
Other qualified imports that needs fixing:
```
import qualified Data.ByteString as BS
import qualified Data.ByteString.Short as SBS
import qualified Data.ByteString.Lazy as BSL
```
Here is some proof for anyone that wants to object:
```
[nix-shell:~/iohk/cardano-ledger]$ git grep "import qualified Data.ByteString.Lazy as LBS" | wc -l
19
[nix-shell:~/iohk/cardano-ledger]$ git grep "import qualified Data.ByteString.Lazy as BSL" | wc -l
57
```
## Others:
* `Data.List.NonEmpty as NE`, not `as NonEmpty`, etc.
```haskell
import qualified Data.List.NonEmpty as NE
```
* `import qualified Data.Foldable as F`, not `as Foldable`, etc.
```haskell
import qualified Data.Foldable as F
```
* `Data.Aeson*`, eg.:
```haskell
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.Key as Aeson
import qualified Data.Aeson.Encoding as Aeson
```
* BaseX encoding
```
import qualified Data.ByteString.Base16 as BS16
import qualified Data.ByteString.Base64 as BS64
```
More bullet points are likely to be added later
Contributor guide
Assessment
This issue has not been assessed yet.