radicle-dev / radicle-alpha

A peer-to-peer stack for code collaboration
https://radicle.xyz
MIT License
912 stars 33 forks source link

Separate Package Boundaries #683

Closed FintanH closed 4 years ago

FintanH commented 4 years ago

During my adventure into the radicle codebase I found there was two packages that could be extracted out into their own packages: radicle-lang and radicle-repl.

radicle-lang consists of only the language modules and is used by radicle and radicle-repl. The modules consist of:

├── Radicle
│   ├── Lang
│   │   ├── Annotation.hs
│   │   ├── Core.hs
│   │   ├── Crypto.hs
│   │   ├── Doc.hs
│   │   ├── Eval.hs
│   │   ├── Identifier.hs
│   │   ├── Internal
│   │   │   ├── Arbitrary.hs
│   │   │   ├── Orphans.hs
│   │   │   ├── Time.hs
│   │   │   └── UUID.hs
│   │   ├── Interpret.hs
│   │   ├── Json.hs
│   │   ├── Number.hs
│   │   ├── Parse.hs
│   │   ├── Pretty.hs
│   │   ├── PrimFns.hs
│   │   └── Type.hs
│   └── TH.hs
└── Radicle.hs

radicle-repl consists of the effects that make up the repl system. The modules that were ported over and renamed were Radicle.Internal.Effects. andRadicle.Internal.Effects.Capabilities`. The modules consist of:

└── Radicle
    ├── Repl
    │   └── Capabilities.hs
    └── Repl.hs

There was some minimum surgery to make things fit and to separate boundaries, but all unit tests were preserved and pass.