+%post
+# Alas, GHC, Hugs and nhc all come with different set of tools in addition to
+# a runFOO:
+#
+# * GHC: hsc2hs
+# * Hugs: hsc2hs, cpphs
+# * nhc: cpphs
+#
+# Therefore it is currently not possible to use --slave below to form link
+# groups under a single name 'runhaskell'. Either these tools should be
+# disentangled from the Haskell implementations or all implementations should
+# have the same set of tools. *sigh*
+update-alternatives --install %{_bindir}/runhaskell runhaskell %{_bindir}/runghc 500
+update-alternatives --install %{_bindir}/hsc2hs hsc2hs %{_bindir}/hsc2hs-ghc 500
+
+%preun
+if test "$1" = 0; then
+ update-alternatives --remove runhaskell %{_bindir}/runghc
+ update-alternatives --remove hsc2hs %{_bindir}/hsc2hs-ghc
+fi
+