-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add doctest helpers * no-op doctest for GHCs < 9.4.6 (workaround to avoid multiline imports being not available in GHCi)
- Loading branch information
Showing
5 changed files
with
180 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{-# LANGUAGE CPP #-} | ||
module Main where | ||
|
||
#if __GLASGOW_HASKELL__ >= 946 | ||
import Test.DocTest (doctest) | ||
|
||
-- 1. Our current doctests require a number of imports that scotty doesn't need | ||
-- 2. declaring doctest helper functions in this module doesn't seem to work | ||
-- 3. cabal tests cannot have exposed modules? | ||
-- 4. GHCi only started supporting multiline imports since 9.4.6 ( https://gitlab.haskell.org/ghc/ghc/-/issues/20473 ) | ||
-- so lacking a better option we no-op doctest for older GHCs | ||
|
||
main :: IO () | ||
main = doctest [ | ||
"Web/Scotty.hs" | ||
, "Web/Scotty/Trans.hs" | ||
, "-XOverloadedStrings" | ||
, "-XLambdaCase" | ||
] | ||
#else | ||
main :: IO () | ||
main = pure () | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters