target 0.2.0.0 → 0.2.0.1
raw patch · 2 files changed
+7/−6 lines, 2 files
Files
- src/Test/Target.hs +6/−5
- target.cabal +1/−1
src/Test/Target.hs view
@@ -76,13 +76,14 @@ printf "Testing %s\n" name sp <- getSpec (ghcOpts opts) path ctx <- mkContext (solver opts)- runTarget opts (initState path sp ctx) (do- ty <- safeFromJust "targetResultWith" . lookup (symbol name) <$> gets sigs- test f ty)- `finally` killContext ctx+ do r <- runTarget opts (initState path sp ctx) $ do+ ty <- safeFromJust "targetResultWith" . lookup (symbol name) <$> gets sigs+ test f ty+ _ <- cleanupContext ctx+ return r+ `onException` terminateProcess (pId ctx) where mkContext = if logging opts then flip makeContext (".target/" ++ name) else makeContextNoLog- killContext ctx = terminateProcess (pId ctx) >> cleanupContext ctx targetResultWithTH :: TH.Name -> FilePath -> TargetOpts -> TH.ExpQ targetResultWithTH f m opts = [| targetResultWith $(monomorphic f) $(TH.stringE $ show f) m opts |]
target.cabal view
@@ -1,5 +1,5 @@ name: target-version: 0.2.0.0+version: 0.2.0.1 synopsis: Generate test-suites from refinement types. description: Target is a library for testing Haskell functions based on