diff -ru orig/src/main/Main.hs new/src/main/Main.hs --- orig/src/main/Main.hs 2013-10-14 09:10:24.895239824 +0300 +++ new/src/main/Main.hs 2013-10-14 09:10:24.000000000 +0300 @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RecordWildCards #-} -- | Main compiler executable. @@ -15,6 +16,9 @@ import Data.Maybe import Data.Version (showVersion) import Options.Applicative +#if MIN_VERSION_optparse_applicative(0,6,0) +import Options.Applicative.Types +#endif import System.Environment -- | Options and help. @@ -119,8 +123,13 @@ <*> switch (long "typecheck-only" <> help "Only invoke GHC for typechecking, don't produce any output") <*> optional (strOption $ long "runtime-path" <> help "Custom path to the runtime so you don't have to reinstall fay when modifying it") + where strsOption m = +#if MIN_VERSION_optparse_applicative(0,6,0) + nullOption (m <> reader (ReadM . Right . wordsBy (== ',')) <> value []) +#else nullOption (m <> reader (Right . wordsBy (== ',')) <> value []) +#endif -- | Make incompatible options.