GitXplorerGitXplorer
r

tilec

public
15 stars
1 forks
0 issues

Commits

List of commits on branch master.
Verified
7b3229d233e0abd388c659e7c11974d8c2782933

:fire: Plicit.

rrobrix committed 4 years ago
Verified
c15aaf10e63f7b47c3f3010ee657ff2cb9bb8d30

Move Return down.

rrobrix committed 4 years ago
Verified
a1cd5adcafc70f2aad2430cfaab6aa28e9dcacb6

Rename I to Return.

rrobrix committed 4 years ago
Verified
aed47819045bbc9298c89369393beafb337a1f9d

Clean up some implicit types.

rrobrix committed 4 years ago
Verified
687efaf26a17ee848c6d733d50f3f322db77496d

Style.

rrobrix committed 4 years ago
Verified
627358d79732ec399ad1ea06b644f8e15ff85a1e

Reformat the library definitions.

rrobrix committed 4 years ago

README

The README file for this repository.

tilec — the tile programming language (and eventually, its compiler)

tile is a dependently-typed programming language, but this package is mostly an experiment in language and compiler engineering.

I have some aspirations to quantitative type theory, higher-order unification, responsive compilation, levitation, and whole-program optimization, but for now I’m just trying to find my footing; don’t expect to be able to write programs in this any time soon.

Language notes

There is no syntax or parser right now. tile programs can only be defined as Haskell expressions.

tile is very small: variables, lambda abstractions & applications, one base type (Type), and dependent function types. While dependently-typed, tile is not intended to be a consistent logic, in part because I don’t know how to write a termination checker yet. Once I learn about that, I might reconsider, as long as I haven’t painted myself completely into a corner w.r.t. its needs.

tile does not have datatypes. The intention is to levitate definitions using Böhm-Berarducci/Mendler encodings instead. I intend there to eventually be be syntax sugar for defining datatypes & pattern matching using these methods.

Likewise, tile does not have (much of) a metalanguage. The intention is for modules and such to be modelled as (possibly parametric) records (which tile also does not have), themselves encoded as described above.

Various parts of this plan might be poorly-thought-out, intractable, what-have-you; that’s ok! The goal is to see what I learn from the process, not to have all the answers already.

Development

Make sure you have a recent enough ghc and cabal; I’m currently developing with ghc 8.8 & cabal 3.0, and I’m not testing against older versions. On macOS, I recommend ghcup.

I do just about everything via ghci, which can be conveniently initialized and launched as follows:

cabal build # make sure dependencies are known & installed
script/repl # actually launch the repl

ghcide integration is also provided, and I edit in VS Code configured to use it.

Architecture

Broadly, tilec is designed to use (untyped) tagless final encodings of DSLs wherever feasible. That means typeclasses for bits of syntax, with instances providing algebras, rather than datatypes & pattern matching.