Permalink
Browse files

test-unamb and segfault comment

darcs-hash:20080909173935-fb517-7a9a07f642ad3110987132f7f55122105599988a.gz
  • Loading branch information...
1 parent 4663827 commit 99dcf9eed2b2c93ec3a58586ccc3947a74b4bbec @conal conal committed Sep 9, 2008
Showing with 24 additions and 4 deletions.
  1. +2 −0 Makefile
  2. +2 −2 src/Tests.hs
  3. +20 −2 unamb.cabal
View
@@ -1 +1,3 @@
+extra-configure-args = -ftest
+
include ../cho-cabal-make.inc
View
@@ -1,7 +1,7 @@
{-# OPTIONS_GHC -Wall #-}
----------------------------------------------------------------------
-- |
--- Module : Tests
+-- Module : Main
-- Copyright : (c) Conal Elliott 2008
-- License : BSD3
--
@@ -11,7 +11,7 @@
-- Unamb tests
----------------------------------------------------------------------
-module Tests where
+module Main where
import Test.QuickCheck.Checkers
import Test.QuickCheck.Later
View
@@ -24,15 +24,33 @@ License: BSD3
Stability: experimental
build-type: Simple
+Flag test
+ Description: Enable testing
+ Default: False
+
Library
hs-Source-Dirs: src
Extensions:
- Build-Depends: base, QuickCheck, checkers
+ Build-Depends: base
Exposed-Modules:
Data.Unamb
- Tests
+-- Tests
ghc-options: -Wall
+-- Support testing with a pattern from Sean Leather
+-- Compilation works, but the executable segfaults:
+-- both identity: Segmentation fault/access violation in generated code
+-- I have no idea what could be going on there. The tests work fine
+-- in ghci but segfault when compiled via "ghc --make Tests" also.
+Executable test-unamb
+ hs-source-dirs: src
+ main-is: Tests.hs
+ -- Only enable the build-depends here if configured with "-ftest". This
+ -- keeps users from having to install QuickCheck 2 in order to use EMGM.
+ if flag(test)
+ build-depends: QuickCheck, checkers
+ else
+ buildable: False
-- The Tests need QuickCheck, checkers
-- Maybe make an executable target.

0 comments on commit 99dcf9e

Please sign in to comment.