--- /dev/null
+diff --git a/src/Check.hs b/src/Check.hs
+index b38a56a..246bf24 100644
+--- a/src/Check.hs
++++ b/src/Check.hs
+@@ -23,3 +23,3 @@ import System.Posix.Env
+ import System.Exit
+-import System.Directory
++import System.Directory hiding (getFileSize)
+ import System.IO.Unsafe
--- /dev/null
+diff --git a/src/Midi.hs b/src/Midi.hs
+index 2b7a359..8c4eacc 100644
+--- a/src/Midi.hs
++++ b/src/Midi.hs
+@@ -1,2 +1,2 @@
+-{-# LANGUAGE TemplateHaskell, FlexibleInstances#-}
++{-# LANGUAGE TemplateHaskell, FlexibleInstances, OverlappingInstances #-}
+
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
>=dev-haskell/cabal-1.18.1.3
"
+PATCHES=(
+ "${FILESDIR}"/${P}-ghc-8.0.2_rc1.patch
+ "${FILESDIR}"/${P}-directory-1.3.patch
+)
+
# $1 - target tarball name (not including extension)
make_snapshot() {
ln -s "${S}" "${WORKDIR}"/"$1" || die