diff --git a/trees-that-shrink/TreesThatShrink.ipynb b/trees-that-shrink/TreesThatShrink.ipynb index 882fbde..0c198c9 100644 --- a/trees-that-shrink/TreesThatShrink.ipynb +++ b/trees-that-shrink/TreesThatShrink.ipynb @@ -143,7 +143,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -170,7 +170,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -189,7 +189,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -224,7 +224,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -259,7 +259,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -297,7 +297,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -322,7 +322,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -343,7 +343,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -354,7 +354,7 @@ " AbsUD f -> eval env f\n", " AppUD f x -> let\n", " x' = eval env x\n", - " in eval (x':env) f" + " in eval (env ++ [x']) f" ] }, { @@ -366,13 +366,13 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "2" + "1" ] }, "metadata": {}, @@ -381,7 +381,7 @@ ], "source": [ "identity = AbsLet \"i\" (VarLet \"i\")\n", - "konst = (AbsLet \"x\" (AbsLet \"y\" (VarLet \"x\")))\n", + "konst = AbsLet \"x\" (AbsLet \"y\" (VarLet \"x\"))\n", "\n", "eval [] . anonymise . desugar Map.empty $ AppLet (AppLet konst (LitLet 1)) (LitLet 2)" ] @@ -402,7 +402,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -496,11 +496,12 @@ "language_info": { "codemirror_mode": "ihaskell", "file_extension": ".hs", + "mimetype": "text/x-haskell", "name": "haskell", "pygments_lexer": "Haskell", - "version": "8.2.2" + "version": "9.4.8" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/trees-that-shrink/default.nix b/trees-that-shrink/default.nix index be3ac50..74b7e31 100644 --- a/trees-that-shrink/default.nix +++ b/trees-that-shrink/default.nix @@ -1,7 +1,20 @@ let pkgs = import ../pkgs.nix; -in import "${pkgs.ihaskell}/release.nix" { - compiler = "ghc928"; - nixpkgs = import pkgs.nixpkgs {}; + overlay = sel: sup: { + nix-filter = import pkgs.nix-filter; + haskell = sup.haskell // { + packages = sup.haskell.packages // { + ghc948 = sup.haskell.packages.ghc948.override { + overrides = self: super: { + ghc-syntax-highlighter = self.ghc-syntax-highlighter_0_0_10_0; + }; + }; + }; + }; + }; + nixpkgs = (import pkgs.nixpkgs { overlays = [ overlay ]; }); + jupyterlab = nixpkgs.python3.withPackages (ps: [ ps.jupyterlab ps.notebook ]); +in nixpkgs.callPackage "${pkgs.ihaskell}/nix/release.nix" { compiler = "ghc948"; }{ packages = self: with self; [ containers ]; + extraEnvironmentBinaries = [jupyterlab]; }