PureScript Prelude 项目教程
purescript-preludeThe PureScript Prelude项目地址:https://gitcode.com/gh_mirrors/pu/purescript-prelude
1. 项目的目录结构及介绍
PureScript Prelude 项目的目录结构如下:
purescript-prelude/
├── src/
│ ├── Control/
│ ├── Data/
│ ├── Prelude.purs
│ └── ...
├── test/
│ ├── Control/
│ ├── Data/
│ └── ...
├── .eslintrc.json
├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── bower.json
└── package.json
目录结构介绍
src/
:包含项目的源代码文件,主要模块如Control
和Data
等。test/
:包含项目的测试代码文件,结构与src/
类似。.eslintrc.json
:ESLint 配置文件。.gitignore
:Git 忽略文件配置。CHANGELOG.md
:项目更新日志。LICENSE
:项目许可证(BSD-3-Clause)。README.md
:项目说明文档。bower.json
:Bower 包管理配置文件。package.json
:NPM 包管理配置文件。
2. 项目的启动文件介绍
PureScript Prelude 项目的启动文件是 src/Prelude.purs
。这个文件是项目的入口点,它导入了许多基础模块,如 Control
和 Data
等,并重新导出了这些模块的类型类和函数。
module Prelude
( module Control.Applicative
, module Control.Apply
, module Control.Bind
, module Control.Category
, module Control.Monad
, module Control.Semigroupoid
, module Data.Boolean
, module Data.BooleanAlgebra
, module Data.Bounded
, module Data.CommutativeRing
, module Data.DivisionRing
, module Data.Eq
, module Data.EuclideanRing
, module Data.Field
, module Data.Function
, module Data.Functor
, module Data.Generic.Rep
, module Data.HeytingAlgebra
, module Data.Monoid
, module Data.Monoid.Additive
, module Data.Monoid.Conj
, module Data.Monoid.Disj
, module Data.Monoid.Dual
, module Data.Monoid.Endo
, module Data.Monoid.Multiplicative
, module Data.Ord
, module Data.Ordering
, module Data.Ring
, module Data.Semigroup
, module Data.Semiring
, module Data.Show
, module Data.Unit
, module Data.Void
) where
import Control.Applicative (class Applicative, pure, liftA1)
import Control.Apply (class Apply, apply)
import Control.Bind (class Bind, bind, discard)
import Control.Category (class Category, id, (<<<), (>>>))
import Control.Monad (class Monad, ap, liftM1)
import Control.Semigroupoid (class Semigroupoid, compose)
import Data.Boolean (class BooleanAlgebra, class BooleanLike, bool, otherwise)
import Data.BooleanAlgebra (class BooleanAlgebra)
import Data.Bounded (class Bounded, top, bottom)
import Data.CommutativeRing (class CommutativeRing)
import Data.DivisionRing (class DivisionRing)
import Data.Eq (class Eq, eq, (==), (/=))
import Data.EuclideanRing (class EuclideanRing, degree, div, mod)
import Data.Field (class Field)
import Data.Function (const, flip, ($), (#))
import Data.Functor (class Functor, map, (<$>), (<#>), void)
import Data.Generic.Rep (class Generic)
import Data.HeytingAlgebra (class HeytingAlgebra, tt, ff, implies, conj, disj, not)
import Data.Monoid (class Monoid, mempty)
import Data.Monoid.Additive (Additive(..))
import Data.Monoid.Conj (Conj(..))
import Data.Monoid.Disj (Disj(..))
import Data.Monoid.Dual (Dual(..))
import Data.Monoid.Endo (End
purescript-preludeThe PureScript Prelude项目地址:https://gitcode.com/gh_mirrors/pu/purescript-prelude