Commit a6563d86 authored by Nicolas Lenz's avatar Nicolas Lenz

Stage 1, pakage

parent 331298dc
......@@ -2,6 +2,7 @@
config.yaml
# ---> Haskell
*.cabal
dist
dist-*
cabal-dev
......
bool : type
{True, False}
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.31.1.
--
-- see: https://github.com/sol/hpack
--
-- hash: 8be90f2031d0309ad5effdfd1bccabf1108f825457ce34543279ee39e5ac9515
name: katrin
version: 0.0.0
synopsis: Experimental functional and dependently-typet programming language
description: Please see the README at <https://git.eisfunke.com/research/katrin#readme>
category: Language
author: Nicolas Lenz
maintainer: nicolas@eisfunke.com
copyright: 2018 Nicolas Lenz
license: Apache-2.0
build-type: Simple
extra-source-files:
README.md
source-repository head
type: git
location: https://git.eisfunke.com/research/katrin
library
exposed-modules:
Katrin
Katrin.Algebra
Katrin.Core
other-modules:
Paths_katrin
hs-source-dirs:
src
build-depends:
base >=4.7 && <5
, text
default-language: Haskell2010
executable katrin
main-is: Main.hs
other-modules:
Paths_katrin
hs-source-dirs:
app
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >=4.7 && <5
, katrin
, text
default-language: Haskell2010
test-suite katrin-test
type: exitcode-stdio-1.0
main-is: Main.hs
other-modules:
Paths_katrin
hs-source-dirs:
test
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >=4.7 && <5
, katrin
, quickcheck-instances
, tasty
, tasty-quickcheck
, text
default-language: Haskell2010
......@@ -4,17 +4,17 @@ license: Apache-2.0
git: "https://git.eisfunke.com/research/katrin"
author: "Nicolas Lenz"
maintainer: "nicolas@eisfunke.com"
copyright: "2018 Nicolas Lenz"
copyright: "2018-2019 Nicolas Lenz"
extra-source-files:
- README.md
synopsis: Experimental functional and dependently-typet programming language
synopsis: Experimental functional and dependently-typed programming language
category: Language
description: Please see the README at <https://git.eisfunke.com/research/katrin#readme>
dependencies:
- base >= 4.7 && < 5
- base
- text
library:
......
resolver: lts-13.0
packages:
- .
resolver: lts-13.27
......@@ -4,40 +4,34 @@
Available features:
- Only integer as data type
- No type annotations
- Single line comments with '#'
- Integer value definitions
- Function definitions
- No pattern matching, only function application
- Braces
- Only pure integers as arguments
- Predefined functions: `plus`, `minus`
- main function takes an integer and returns one
- Only `nat` as data type
- Single line comments with `//`
- Definitions
- `nat` literals
- Lambdas
- Left-associative prefix function application
- Recursion
- Parentheses
- No shadowing
- Predefined functions: `succ : nat -> nat`, `pred : nat -> nat` (partial)
- `main : nat -> nat`
- Compiled program takes one parameter with the argument and prints the result out
Not yet turing-complete due to missing conditionals.
```
x = 5
plus: nat -> nat -> nat
x => 1 => succ x
x => y => plus (succ x) (pred y)
f x = plus x 3
mult : nat -> nat -> nat
x => 1 => x
x => y => plus x (mult x (pred y))
g x = minus (f x) 2
fac : nat -> nat
1 => 1
n => mult n (fac (pred n))
main = g ()
main : nat -> nat
n => fac n
```
## Stage 2
Additional features:
- Pattern matching
- Type annotations
- Functions as arguments
## Stage 3
- Traits
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment