Apply-Refact 项目使用教程

随笔9小时前发布 明月入抱
4 0 0

Apply-Refact 项目使用教程

apply-refactRefactor Haskell source files项目地址:https://gitcode.com/gh_mirrors/ap/apply-refact

1. 项目的目录结构及介绍




apply-refact/


├── app/


│   └── Main.hs


├── src/


│   ├── ApplyRefact.hs


│   ├── ApplyRefact/


│   │   ├── Fixity.hs


│   │   ├── GHC.hs


│   │   ├── Main.hs


│   │   ├── Monad.hs


│   │   ├── Rename.hs


│   │   ├── Rewrite.hs


│   │   ├── Utils.hs


│   │   └── WError.hs


│   └── Paths_apply_refact.hs


├── test/


│   ├── Spec.hs


│   ├── TestUtils.hs


│   └── tests/


│       ├── Basic.hs


│       ├── Fixity.hs


│       ├── GHC.hs


│       ├── Rename.hs


│       ├── Rewrite.hs


│       └── Utils.hs


├── apply-refact.cabal


├── CHANGELOG.md


├── LICENSE


├── README.md


└── Setup.hs

app/: 包含应用程序的入口文件 Main.hssrc/: 包含项目的主要源代码文件,其中 ApplyRefact.hs 是主模块,ApplyRefact/ 目录下包含各个子模块。test/: 包含项目的测试文件,Spec.hs 是测试入口文件,tests/ 目录下包含各个测试用例。apply-refact.cabal: 项目的配置文件。CHANGELOG.md: 项目更新日志。LICENSE: 项目许可证。README.md: 项目说明文档。Setup.hs: 项目构建脚本。

2. 项目的启动文件介绍

项目的启动文件位于 app/Main.hs,它是整个应用程序的入口点。该文件主要负责初始化并启动应用,调用 src/ApplyRefact.hs 中的功能。

3. 项目的配置文件介绍

项目的配置文件是 apply-refact.cabal,它包含了项目的元数据、依赖、源目录、测试配置等信息。以下是配置文件的部分内容示例:




name: apply-refact


version: 0.14.0.0


synopsis: Perform refactorings specified by the refact package.


description: This tool performs the refactorings specified by the refact package.


homepage: https://github.com/mpickering/apply-refact


bug-reports: https://github.com/mpickering/apply-refact/issues


license: BSD3


author: Matthew Pickering


maintainer: Matthew Pickering <matthewtpickering@gmail.com>


category: Development


build-type: Simple


cabal-version: >=1.10


 


executable refactor


  main-is: Main.hs


  other-modules:


      Paths_apply_refact


  hs-source-dirs:


      app


      src


  build-depends:


      base >=4.12 && <4.13,


      ghc >=8.6 && <8.7,


      ghc-exactprint >=0.6 && <0.7,


      refact >=0.3 && <0.4


  default-language: Haskell2010

该文件定义了项目的名称、版本、描述、依赖等信息,并指定了主入口文件和其他模块的位置。

apply-refactRefactor Haskell source files项目地址:https://gitcode.com/gh_mirrors/ap/apply-refact

© 版权声明

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...