Skip to content
This repository has been archived by the owner on Apr 11, 2021. It is now read-only.
/ nihil Public archive

Nihil, a statically typed interpreted functional programming language

License

Notifications You must be signed in to change notification settings

Mesabloo/nihil

Repository files navigation

Nihil

Nihil icon

stars forks

Table of contents

About Nihil

programming language code size

Nihil is a statically- and quantitively-typed functional programming language aimed at producing type- and data-safe lazy programs running without Garbage Collectors.

It is more in a “proof of concept” stage than production-ready, but a prototype will soon appear as there aren't much things left to do. (well there is in terms of difficulty, but not in terms of number)

Why Nihil?

Nihil came to life after I had an idea: “what if we could control how much resources are used?”

In the beginning, I was willing to make an esoteric language, poorly designed, but functional.

Beginning with some C++, I built my own parser combinators library, an old crappy one, which in the end wasn't working that well, because of some strange things I am still unable to really understand.

@felko introduced me to Haskell, and I wanted to give it a try for many months. That was the perfect time to do so, and so did I restart everything, but this time in Haskell. This led me here, to what I currently have right now, a fully functional basic compiler, mostly written by myself (except the old kind checker, see this pull request).

Roadmap

The ultimate goal is to provide these features:

  • Basic features:
    • Anonymous functions
    • User defined operators with custom fixities
    • Pattern matching
    • Data types
    • Type aliases
  • Advanced features:
    • Kinds
    • GADTs
    • Equational pattern matching
    • Records
    • Row polymorphism
    • Type classes and instances
    • Quantitive types
    • Modules
    • Polymorphic kinds
  • Advanced future features (not in the prototype):
    • Rank N types / forall
    • Type families (type-level functions)
    • Type applications
    • Laziness
    • Dependent types
    • Algebraic effects ?

Unicode

Nihil natively supports some unicode equivalents to ASCII characters:

ASCII Unicode
->
=>
\ λ
Prod

Examples

Some code examples can be found in the examples folder.

Contributors

User What has been done
@felko Kind checker ; various help about many subjects (parsing, typechecking...)
Huge thanks for all the help given.
@mesabloo Basically everything else

References, inspirations

  • The Granule project, a statically typed functional programming language with Graded Modal Types
  • Pikelet, a dependently typed functional programming language
  • GHC, the Great Glasgow Haskell Compiler

About

Nihil, a statically typed interpreted functional programming language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published