From f5a6ccb363a72d4cc2cd2f55a65cd66e9ccf5f26 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 29 Jun 2020 05:36:16 +0300 Subject: [PATCH] Appease Hackage --- yesod-bin/AddHandler.hs | 24 ++++++++++++------------ yesod-bin/yesod-bin.cabal | 3 ++- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/yesod-bin/AddHandler.hs b/yesod-bin/AddHandler.hs index f3fd3b61..f36d4f2a 100644 --- a/yesod-bin/AddHandler.hs +++ b/yesod-bin/AddHandler.hs @@ -62,18 +62,18 @@ addHandlerInteractive :: IO () addHandlerInteractive = do cabal <- getCabal let routeInput = do - putStr "Name of route (without trailing R): " - hFlush stdout - name <- getLine - checked <- checkRoute name cabal - case checked of - Left err@EmptyRoute -> (error . show) err - Left err@RouteCaseError -> print err >> routeInput - Left err@(RouteExists _) -> do - print err - putStrLn "Try another name or leave blank to exit" - routeInput - Right p -> return p + putStr "Name of route (without trailing R): " + hFlush stdout + name <- getLine + checked <- checkRoute name cabal + case checked of + Left err@EmptyRoute -> (error . show) err + Left err@RouteCaseError -> print err >> routeInput + Left err@(RouteExists _) -> do + print err + putStrLn "Try another name or leave blank to exit" + routeInput + Right p -> return p routePair <- routeInput putStr "Enter route pattern (ex: /entry/#EntryId): " diff --git a/yesod-bin/yesod-bin.cabal b/yesod-bin/yesod-bin.cabal index 5c7125d5..5e6db779 100644 --- a/yesod-bin/yesod-bin.cabal +++ b/yesod-bin/yesod-bin.cabal @@ -8,7 +8,7 @@ synopsis: The yesod helper executable. description: See README.md for more information category: Web, Yesod stability: Stable -cabal-version: >= 1.6 +cabal-version: >= 1.10 build-type: Simple homepage: http://www.yesodweb.com/ @@ -19,6 +19,7 @@ extra-source-files: *.pem executable yesod + default-language: Haskell2010 if os(windows) cpp-options: -DWINDOWS if os(openbsd)