Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mchav/froid
A library for using the Frege programming language in Android development.
https://github.com/mchav/froid
android android-development frege frege-programming-language functional-programming
Last synced: 2 months ago
JSON representation
A library for using the Frege programming language in Android development.
- Host: GitHub
- URL: https://github.com/mchav/froid
- Owner: mchav
- Created: 2016-12-20T17:16:35.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-27T00:27:07.000Z (over 6 years ago)
- Last Synced: 2024-02-13T04:39:01.960Z (10 months ago)
- Topics: android, android-development, frege, frege-programming-language, functional-programming
- Language: Frege
- Size: 38.6 MB
- Stars: 100
- Watchers: 11
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-frege - froid - Library for using Frege in Android development. (Libraries / Android)
README
# froid
A library for using the Frege programming language in Android development.
## Usage and examples
To get/setup froid read the instructions on the [froid Wiki](https://github.com/mchav/froid/wiki). To write a simple application from scratch follow [this step-by-step tutorial](https://github.com/mchav/froid/wiki/Tutorial).
Simple Activity
---------------
```frege
module io.github.mchav.fregeandroid.FregeActivity whereimport froid.app.Activity
import froid.content.Context
import froid.os.Bundle
import froid.widget.TextViewnative module type Activity where {}
onCreate :: Activity -> Maybe Bundle -> IO ()
onCreate this bundle = do
tv <- TextView.new this
tv.setText "Hello, Android - Love, Frege"
this.setContentView tv
```## Example
You can find a more involved example [here](https://github.com/mchav/GeoQuiz-Frege). More will be available soon.
## Building froid
Run `compile` and then `package`.
## Contributing
A lot of what there is to do is create the bindings for the other types in `android`. For classes such as adapters/fragments read [this](http://mchav.github.io/functional-inheritance-in-android/) to learn about the design philosophy for subclassing. Any PRs of this nature are welcome.