This file has been truncated. show original
# Project Prelude
If you ever find yourself thinking, "I wish `<ModuleName>` was in `Prelude`," or "I wish I didn't have to import `<ModuleName>` in each PureScript file," this design pattern is for you.
PureScript files can often have a lot of lines for just the import statements. While it makes it easier to see which function is being used in a given file, it can be tedious to import everything, even with tooling that enables auto-importing.
However, most projects and applications will define a project-specific Prelude to be used just in that project. Rather than typing something like this in each of your files:
import Effect (Effect)
import Effect.Class (class MonadEffect, liftEffect)
import Effect.Aff (Aff, launchAff_)
import Effect.Aff.Class (class MonadAff, liftAff)
import Control.Monad.Reader.Class (class MonadReader, ask, local)
import Control.Monad.State.Class (class MonadState, get, put, modify_)
import Data.Array ((:), (!!))
import Data.Bifunctor (class Bifunctor, bimap, lmap, rmap)
import Data.Maybe (Maybe(..), maybe, fromJust)
import Data.Newtype (class Newtype, un)