anchor.diff:      --gecos "Default user" \
       --uid ${NB_UID} \
       ${NB_USER}
  +
  +RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack'
   
   # Set up a working directory for IHaskell
   RUN mkdir ${HOME}/ihaskell
  
positive.code: FROM fpco/stack-build:lts-14.23
  
  # Install all necessary Ubuntu packages
  RUN apt-get update && apt-get install -y python3-pip libgmp-dev libmagic-dev libtinfo-dev libzmq3-dev libcairo2-dev libpango1.0-dev libblas-dev liblapack-dev gcc g++ && \
      rm -rf /var/lib/apt/lists/*
  
  # Install Jupyter notebook
  RUN pip3 install -U jupyter
  
  ENV LANG en_US.UTF-8
  ENV NB_USER jovyan
  ENV NB_UID 1000
  ENV HOME /home/${NB_USER}
  
negative.code: USER ${NB_UID}
  
  # Set up stack
  COPY --chown=${NB_UID}:${NB_UID} stack.yaml stack.yaml
  RUN stack config set system-ghc --global true
  
  # Install dependencies for IHaskell
  COPY --chown=${NB_UID}:${NB_UID} ihaskell.cabal ihaskell.cabal
  COPY --chown=${NB_UID}:${NB_UID} ipython-kernel ipython-kernel
  COPY --chown=${NB_UID}:${NB_UID} ghc-parser ghc-parser
  COPY --chown=${NB_UID}:${NB_UID} ihaskell-display ihaskell-display
  
  RUN stack build --only-snapshot
  
  # Install IHaskell itself. Don't just COPY . so that
  # changes in e.g. README.md don't trigger rebuild.
  COPY --chown=${NB_UID}:${NB_UID} src ${HOME}/ihaskell/src
  COPY --chown=${NB_UID}:${NB_UID} html ${HOME}/ihaskell/html
  COPY --chown=${NB_UID}:${NB_UID} main ${HOME}/ihaskell/main
  COPY --chown=${NB_UID}:${NB_UID} LICENSE ${HOME}/ihaskell/LICENSE
  
  RUN stack build && stack install
  
  