commit dcf8120deaf34a6d81c4040491d52b573b6dfe90
parent b3dd945b824e3eae92edf08f8b8f65c23d9eff82
Author: James Eversole <james@eversole.co>
Date: Wed, 18 Dec 2024 19:41:12 -0600
Clean up
Diffstat:
4 files changed, 6 insertions(+), 39 deletions(-)
diff --git a/README.md b/README.md
@@ -1,6 +1,6 @@
# sapling
-sapling is a "micro-language" that I'm working on to investigate [Tree Calculus](https://treecalcul.us/specification) .
+sapling is a "micro-language" that I'm working on to investigate [Tree Calculus](https://github.com/barry-jay-personal/typed_tree_calculus/blob/main/typed_program_analysis.pdf) .
It offers a minimal amount of syntax sugar:
@@ -9,10 +9,10 @@ It offers a minimal amount of syntax sugar:
- Lambda abstractions
- List, Integer, and String literals
-This is an active experimentation project by someone who has no idea what they're doing.
+This is an active experimentation project by [someone who has no idea what they're doing](https://eversole.co).
## Acknowledgements
Tree Calculus was discovered by [Barry Jay](https://github.com/barry-jay-personal/blog).
-[treecalcul.us](https://treecalcul.us) is an excellent website with an intuitive playground created by [Johannes Bader](https://johannes-bader.com/) that introduced me to Tree Calculus. If sapling sounds interesting but you don't want to figure out how to compile Haskell, check his site out.
+[treecalcul.us](https://treecalcul.us) is an excellent website with an intuitive playground created by [Johannes Bader](https://johannes-bader.com/) that introduced me to Tree Calculus. If sapling sounds interesting but compiling this repo sounds like a hassle, you should check out his site.
diff --git a/flake.nix b/flake.nix
@@ -41,26 +41,5 @@
};
devShell = self.devShells.${system}.default;
- packages.${containerPackageName} = pkgs.dockerTools.buildImage {
- name = "sapling";
-
- copyToRoot = pkgs.buildEnv {
- name = "image-root";
- paths = [ sapling ];
- pathsToLink = [ "/bin" ];
- };
- tag = "latest";
- config = {
- Cmd = [
- "/bin/sapling"
- ];
- WorkingDir = "/app";
- ExposedPorts = {
- "3000/tcp" = {};
- };
- extraCommands = ''
- '';
- };
- };
});
}
diff --git a/sapling.cabal b/sapling.cabal
@@ -2,7 +2,7 @@ cabal-version: 1.12
name: sapling
version: 0.0.1
-description: Tree Calculus Experiment
+description: Tree Calculus experiment repository
author: James Eversole
maintainer: james@eversole.co
copyright: James Eversole
@@ -10,8 +10,7 @@ license: ISC
license-file: LICENSE
build-type: Simple
extra-source-files:
- README
- ChangeLog.md
+ README.md
executable sapling
main-is: Main.hs
diff --git a/src/Research.hs b/src/Research.hs
@@ -5,10 +5,7 @@ import Control.Monad.State
import qualified Data.Map as Map
import Data.Map (Map)
-data T
- = Leaf -- t
- | Stem T -- t t
- | Fork T T -- t a b
+data T = Leaf | Stem T | Fork T T
deriving (Show, Eq, Ord)
apply :: T -> T -> T
@@ -40,14 +37,6 @@ _K = Stem Leaf
_I :: T
_I = apply (apply _S _K) _K -- Fork (Stem (Stem Leaf)) (Stem Leaf)
--- Lambda
-data Lambda
- = Var String
- | App Lambda Lambda
- | Lam String Lambda
- | TC T
- deriving (Show, Eq)
-
-- Booleans
_false :: T
_false = Leaf