Commit 6d257bbe authored by Pepe Iborra's avatar Pepe Iborra
Browse files

Advances in the test suite

parent 1a91b0d9
......@@ -136,7 +136,7 @@ $(TOP)/timeout/timeout$(exeext) :
cd $(TOP)/timeout && $(MAKE) $(MFLAGS) all
test: timeout
$(PYTHON) $(RUNTESTS) $(RUNTEST_OPTS) \
python2.5 $(RUNTESTS) $(RUNTEST_OPTS) \
$(patsubst %, --only=%, $(TEST)) \
$(patsubst %, --only=%, $(TESTS)) \
$(patsubst %, --way=%, $(WAY)) \
......
A.hs:8:9:
Warning: Extracted ids: [a, c, b, i, d]
[a, (), forall a. a -> a, a, Integer -> Integer -> Integer]
Warning: Extracted ids: [a, c, b, d, i]
[a, (), forall a. a -> a, Integer -> Integer -> Integer, a]
Local bindings in scope:
a :: a, c :: (), b :: forall a. a -> a, i :: a,
d :: Integer -> Integer -> Integer
a :: a, c :: (), b :: forall a. a -> a, d :: Integer -> Integer -> Integer,
i :: a
A.hs:8:9-18> a :: GHC.Base.Unknown
A.hs:8:9-18> b :: a -> a
A.hs:8:9-18> c :: ()
A.hs:8:9-18> d :: Integer -> Integer -> Integer
A.hs:8:9-18> a = (_t1::GHC.Base.Unknown)
A.hs:8:9-18> a = (_t1::a)
b = (_t2::forall a. a -> a)
c = ()
d = (_t3::Integer -> Integer -> Integer)
......
break 10 - fails as coalescing is temporarily disabled
break 4 - implicit params are not working yet
break 7 - status on mdo ?
print 4 - My TH is broken ?
print 7 - the issue with unboxed fields
dynbk4 - status on mdo ?
dynbk5 - My TH is broken ?
module TupleN where
import Language.Haskell.TH
tuple :: Int -> ExpQ
tuple n = [|\list -> $(tupE (exprs [|list|])) |]
where
exprs list = [infixE (Just (list))
(varE "!!")
(Just (litE $ integerL (toInteger num)))
| num <- [0..(n - 1)]]
\ No newline at end of file
-- TH generated code does not get instrumented
-- This test fails and proves that -fdebugging is not compatible with TH codeope
:set -fglasgow-exts
:set -fth
:set -fdebugging
:l A
:show bkptTable
\ No newline at end of file
:show breakpoints
\ No newline at end of file
import Data.Typeable
import Data.Generics
data A = A deriving (Eq,Enum,Show,Ord,Typeable,Data)
f x = id x
\ No newline at end of file
-- TH generated code does not get instrumented
-- Higher order Test: ensure dictionaries, coercions and friends don't show up
:set -fglasgow-exts
:set -fdebugging
:l A
:show bkptTable
\ No newline at end of file
f :: Maybe Int
f = do
i <- return 1
j <- return 2
k <- return 3
return i
\ No newline at end of file
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
test('dynbk007', normal, ghci_script, ['dynbk007.script'])
-- Breakpoints in do statements
:set -fdebugging
:l A.hs
-- :break add Main 3 This bkpt gets coalesced due to empty local bindings, which is fine
:break add Main 4
:break add Main 5
Breakpoint set at (4,8)
Breakpoint set at (5,8)
f :: Int -> [Int]
f i = [ j | j <- [i], h <- [j], k <- [h]]
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
test('dynbk008', normal, ghci_script, ['dynbk008.script'])
-- Breakpoints on binding sites that start with a List Comprehension were being coalesced, as list comp. are desugared to Lets and we coalesce bkpts in binding sites that start with a Let (i.e. we postpone the breakpoint to the body of the Let)
:set -fdebugging
:l A.hs
:break add Main 2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment