Skip to content

Sort imports

We should decide some categorizations, sort the imports and dump them out. As a first pass: open imports, explicit imports, qualified imports

Turn this:

module Foo where

import Data.Maybe (maybe)
import Data.List as List
import Prelude
import Data.List (nil, cons)
import Control.Monad.Eff.Console (log)
import Prelewd

into this:

module Foo where

import Prelewd
import Prelude

import Control.Monad.Eff.Console
  ( log
  )
import Data.List
  ( cons
  , nil
  )
import Data.Maybe
  ( maybe
  )

import Data.List as List

Important things to note:

  • Explicit import values are sorted within the import list
  • Imports are sorted within their category
  • There is a blank space between open imports, explicit imports, and qualified imports
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information