https://github.com/alecaivazis/yahl
YetAnotherHaskell: for the LLVM
https://github.com/alecaivazis/yahl
Last synced: 4 months ago
JSON representation
YetAnotherHaskell: for the LLVM
- Host: GitHub
- URL: https://github.com/alecaivazis/yahl
- Owner: AlecAivazis
- Created: 2016-06-08T20:51:53.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-29T07:36:15.000Z (almost 9 years ago)
- Last Synced: 2025-01-11T17:47:19.533Z (5 months ago)
- Language: Haskell
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yahl
YetAnotherHaskell: for the LLVM# Description
`yahl` is mostly a personal project to explore various language constructs.
Technically, its a haskell written for the LVVM that tries to mimic conventional
lambda calculus notation in its syntax.# Examples
## Function Declaration
Function declaration resembles traditional Haskell syntax:
```
foo x -> 2 * x
```## Variable definition
Defining a variable in `yahl` is defined as a constant function:
```
foo -> 'bar'
```## Lambda functions
The syntax for lambda function declaration:
```
λ x -> 2x
```This defines an anonymous function that takes one paramters and returns twice the value.
### Multiple Arguments
Functions are curried by default so the following two expressions are equivalent:
```
λ x -> λ y -> x y
```
```
λ x y -> x y
```## Calling a function
Function invocation resembles traditional haskell syntax
```
foo x -> 2 * x
foo 2
```