#!/bin/bash

set -e

apt-get -y --purge remove libghc-setlocale-doc
ret="$(hoogle categoryToCInt)"
test "$ret" = "No results found"

apt-get -y install libghc-setlocale-doc
ret="$(hoogle categoryToCInt)"
test "$ret" = "System.Locale.SetLocale categoryToCInt :: Category -> CInt"

apt-get -y --purge remove libghc-setlocale-doc
ret="$(hoogle categoryToCInt)"
test "$ret" = "No results found"
