Here's an ADT which is not a GADT, in Haskell:
data Expr = IntExpr Int | BoolExpr Bool| #!/bin/sh | |
| echo -e "-- Removing exited containers --\n" | |
| docker ps --all --quiet --filter="status=exited" | xargs --no-run-if-empty docker rm --volumes | |
| echo -e "\n\n-- Removing untagged images --\n" | |
| docker rmi --force $(docker images | awk '/^<none>/ { print $3 }') | |
| echo -e "\n\n-- Removing volume directories --\n" | |
| docker volume rm $(docker volume ls --quiet --filter="dangling=true") |
| # Use this environment to publish this package on pypi: | |
| # | |
| # # Enter the environment | |
| # nix-shell release.nix | |
| # | |
| # # create the package | |
| # python setup.py bdist | |
| # | |
| # # register to pypi (if not registered yet) | |
| # twine register dist/project_name-x.y.z.tar.gz |
| #!/bin/sh | |
| # Put in your Rust repository's .git/hooks/pre-commit to ensure you never | |
| # breaks rustfmt. | |
| # | |
| # WARNING: rustfmt is a fast moving target so ensure you have the version that | |
| # all contributors have. | |
| for FILE in `git diff --cached --name-only`; do | |
| #if [[ $FILE == *.rs ]] && ! rustup run nightly rustfmt --write-mode diff --skip-children $FILE; then |
| import scala.util.Try | |
| object PathSerializer { | |
| trait SerDe[A] { | |
| // By using a path dependent type, we can be sure can deserialize without wrapping in Try | |
| type Serialized | |
| def ser(a: A): Serialized | |
| def deser(s: Serialized): A | |
| // If we convert to a generic type, in this case String, we forget if we can really deserialize |
| package a8.scalajs.ui | |
| import cats.implicits._ | |
| import mhtml._ | |
| import mhtml.implicits.cats._ | |
| import a8.common.Labeler | |
| import a8.manna.model.ElementId | |
| import a8.scalajs.Events | |
| import org.scalajs.dom | |
| import org.scalajs.dom.KeyboardEvent |
| let | |
| moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz); | |
| nixpkgs = import <nixpkgs> { overlays = [ moz_overlay ]; }; | |
| in | |
| with nixpkgs; | |
| stdenv.mkDerivation { | |
| name = "veloren-env"; | |
| buildInputs = [ | |
| (nixpkgs.rustChannelOf { date = "2019-04-11"; channel = "nightly"; }).rust | |
| git |