Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bow-swift/bow
🏹 Bow is a cross-platform library for Typed Functional Programming in Swift
https://github.com/bow-swift/bow
bow carthage category-theory cocoapods composition declarative-programming effects fp free-monad functional-programming functor hacktoberfest monad mtl reactive-programming spm swift swift-library tagless-final
Last synced: 4 days ago
JSON representation
🏹 Bow is a cross-platform library for Typed Functional Programming in Swift
- Host: GitHub
- URL: https://github.com/bow-swift/bow
- Owner: bow-swift
- License: other
- Created: 2018-03-07T15:01:09.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-09T21:51:49.000Z (about 2 years ago)
- Last Synced: 2024-11-19T02:16:49.275Z (24 days ago)
- Topics: bow, carthage, category-theory, cocoapods, composition, declarative-programming, effects, fp, free-monad, functional-programming, functor, hacktoberfest, monad, mtl, reactive-programming, spm, swift, swift-library, tagless-final
- Language: Swift
- Homepage: https://bow-swift.io
- Size: 726 MB
- Stars: 647
- Watchers: 20
- Forks: 32
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-ios - Bow - Typed Functional Programming companion library for Swift. (Functional Programming / Getting Started)
- awesome-swift - Bow - Companion library for Typed Functional Programming. (Libs / Utility)
- awesome-swift - Bow - Companion library for Typed Functional Programming in Swift. (Extensions)
- awesome-functional-programming - Bow - Companion library for Typed Functional Programming in Swift. (Table of Contents / Repos)
- awesome-swift - Bow - Companion library for Typed Functional Programming. (Libs / Utility)
- awesome-ios-star - Bow - Typed Functional Programming companion library for Swift. (Functional Programming / Getting Started)
- fucking-awesome-swift - Bow - Companion library for Typed Functional Programming. (Libs / Utility)
- awesome-swift - Bow - Bow is a cross-platform library for Typed Functional Programming in Swift ` 📝 7 months ago ` (Utility [🔝](#readme))
README
![](https://github.com/bow-swift/bow-art/blob/master/assets/bow-header-github.png?raw=true)
Bow is a cross-platform library for Typed Functional Programming in Swift.
## Documentation
All documentation and API reference is published in [our website](https://bow-swift.io/). Some links to key aspects of the library:
- [Higher Kinded Type emulation](https://bow-swift.io/next/docs/fp-concepts/higher-kinded-types/)
- [Type classes](https://bow-swift.io/next/docs/fp-concepts/type-classes/)
- [Data types](https://bow-swift.io/next/docs/fp-concepts/data-types/)
- [Optics](https://bow-swift.io/next/docs/optics/optics-overview/)
- [Effects](https://bow-swift.io/next/docs/effects/effects-overview/)
- [Streams](https://bow-swift.io/next/docs/integrations/rxswift-streams/)## Modules
Bow is split into multiple modules that can be consumed independently. These modules are:
- `Bow`: core library. Contains Higher Kinded Types emulation, function manipulation utilities, Typeclasses, Data Types, Monad Transformers, and instances for primitive types.
- `BowOptics`: module to work with different optics.
- `BowRecursionSchemes`: module to work with recursion schemes.
- `BowFree`: module to work with Free Monads.
- `BowGeneric`: module to work with generic data types.
- `BowEffects`: module to work with effects.
- `BowRx`: module to provide an integration with RxSwift.There are also some modules for testing:
- `BowLaws`: laws for type classes in the core module.
- `BowOpticsLaws`: laws for optics.
- `BowEffectsLaws`: laws for effects.
- `BowGenerators`: generators for Property-based Testing for data types in the core module.
- `BowFreeGenerators`: generators for Property-based Testing for data types in BowFree.
- `BowEffectsGenerators`: generators for Property-based Testing for data types in BowEffects.
- `BowRxGenerators`: generators for Property-based Testing for data types in BowRx.Bow is available using Swift Package Manager, CocoaPods, and Carthage.
### Swift Package Manager
Starting on Xcode 11, you can use the integration in the IDE with Swift Package manager to bring the dependencies into your project. You only need the repository URL: [https://github.com/bow-swift/bow.git](https://github.com/bow-swift/bow.git). For earlier versions of Xcode, create a `Package.swift` file similar to the next one and use the dependencies at your convenience.
```swift
// swift-tools-version:5.0import PackageDescription
let package = Package(
name: "BowTestProject",
dependencies: [
.package(url: "https://github.com/bow-swift/bow.git", from: "{version}")
],
targets: [
.target(name: "BowTestProject",
dependencies: [
"Bow",
"BowOptics",
"BowRecursionSchemes",
"BowFree",
"BowGeneric",
"BowEffects",
"BowRx"]),
.testTarget(name: "BowTestProjectTests",
dependencies: [
// Type class laws
"BowLaws",
"BowOpticsLaws",
"BowEffectsLaws",// Generators for PBT with SwiftCheck
"BowGenerators",
"BowFreeGenerators",
"BowEffectsGenerators",
"BowRxGenerators"])
]
)
```To build it, just run:
```
$ swift build
```### CocoaPods
You can consume each Bow module as a separate pod. You can add these lines to your Podfile at your convenience:
```ruby
pod "Bow", "~> {version}"
pod "BowOptics", "~> {version}"
pod "BowRecursionSchemes", "~> {version}"
pod "BowFree", "~> {version}"
pod "BowGeneric", "~> {version}"
pod "BowEffects", "~> {version}"
pod "BowRx", "~> {version}"
```Testing laws:
```ruby
pod "BowLaws", "~> {version}"
pod "BowOpticsLaws", "~> {version}"
pod "BowEffectsLaws", "~> {version}"
```Generators for property-based testing with SwiftCheck:
```ruby
pod "BowGenerators", "~> {version}"
pod "BowFreeGenerators", "~> {version}"
pod "BowEffectsGenerators", "~> {version}"
pod "BowRxGenerators", "~> {version}"
```### Carthage
Carthage will download the whole Bow project, but it will compile individual frameworks for each module that you can use separately. Add this line to your Cartfile:
```
github "bow-swift/Bow" ~> {version}
```## Contributing
If you want to contribute to this library, you can check the [Issues](https://github.com/arrow-kt/bow/issues) to see some of the pending tasks.
### How to run the project
Open `Bow.xcodeproj` in Xcode 11 (or newer) and you are ready to go. Bow uses the Swift Package Manager to handle its dependencies.
### How to run the documentation project
- Go to the root directory.
- Run `nef compile --project Documentation.app` to get all dependencies.
- Open `Documentation.app` and run the project.For further information, refer to our [Contribution guidelines](CONTRIBUTING.md).
## How to create a new release
You can create a new release by running `bundle exec fastlane release version_number:`. For example, `bundle exec fastlane ios release version_number: "0.8.0"`.
The following steps would be run:
- Update the `version` in `*.podspec` files.
- Create a tag with message added in the `CHANGELOG` file.
- Deploy podspec files and make them publicly available.# License
Copyright (C) 2018-2021 The Bow Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.