-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
62 additions
and
40 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
24 changes: 20 additions & 4 deletions
24
cabal-testsuite/PackageTests/HooksPreprocessor/package-with-hooks/test/Main.hs
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 |
---|---|---|
@@ -1,8 +1,24 @@ | ||
{-# LANGUAGE TemplateHaskell #-} | ||
|
||
module Main ( main ) where | ||
|
||
import MyLib ( someFunc ) | ||
-- template-haskell | ||
import Language.Haskell.TH | ||
( runIO ) | ||
|
||
-- package-with-hooks | ||
import CallCustomPp | ||
( callCustomPp ) | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
-- Check that we can invoke the custom preprocessor, and that it finds its | ||
-- data directory, both at compile-time and at run-time. | ||
|
||
$( do | ||
runIO callCustomPp | ||
return [] | ||
) | ||
|
||
main :: IO () | ||
main = if someFunc 11 == 1728 | ||
then return () | ||
else error "Failure" | ||
main = callCustomPp |