Apply-Refact 项目使用教程

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.hs
  • src/: 包含项目的主要源代码文件,其中 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

仰北帅Bobbie

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值