Commit 197917ed authored by Simon Peyton Jones's avatar Simon Peyton Jones

Merge branch 'master' of http://darcs.haskell.org//testsuite

Conflicts:
	tests/polykinds/all.T
	tests/simplCore/should_run/T5915.stdout
parents d773cf69 9f598bbc
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DataKinds, KindSignatures #-}
{-# LANGUAGE GADTs #-}
module PolyKinds06 where
......
{-# LANGUAGE PolyKinds,
GADTs,
DataKinds,
KindSignatures
#-}
module T5935 where
data SList a where
SNil :: SList '[]
x :: SList ('[] :: [Bool])
x = SNil
......@@ -30,4 +30,6 @@ test('T5912', normal, compile, [''])
test('T5881', normal, run_command, ['$MAKE -s --no-print-directory T5881'])
test('T5716', normal, compile_fail, [''])
test('T5937', normal, compile, [''])
test('T5935', normal, compile, [''])
{-# LANGUAGE TemplateHaskell #-}
module T1541 where
$( [d| infixr 3 +++
(+++) :: Int -> Bool -> Bool
(+++) x y = error "ruk"
|])
-- This definition will only typecheck if the
-- the fixity of (+++) is infixr
foo p q r = p +++ q +++ r
{-# LANGUAGE GADTSyntax, TemplateHaskell, KindSignatures #-}
module T5882 where
data Foo :: * -> * where
Foo :: a -> Foo a
$( [d| data Bar :: * -> * where
Bar :: a -> Bar a
|] )
f (Bar x) = Foo x
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module T5883 where
import Language.Haskell.TH
$( [d|
data Unit = Unit
instance Show Unit where
show _ = ""
{-# INLINE show #-}
|])
T5883.hs:1:1: Splicing declarations
[d| data Unit = Unit
instance Show Unit where
show _ = ""
{-# INLINE show #-} |]
======>
T5883.hs:(7,4)-(12,4)
data Unit = Unit
instance Show Unit where
{-# INLINE show #-}
show _ = ""
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module T5886 where
import T5886a
$(bang)
{-# LANGUAGE UnicodeSyntax #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module T5886a where
import Language.Haskell.TH
class C α where
type AT α
bang DecsQ
bang = return [InstanceD [] (AppT (ConT ''C) (ConT ''Int))
[TySynInstD ''AT [ConT ''Int] (ConT ''Int)]]
......@@ -220,4 +220,9 @@ test('T5665', extra_clean(['T5665a.hi','T5665a.o']),
test('T5700', extra_clean(['T5700a.hi','T5700a.o']),
multimod_compile, ['T5700','-v0 -ddump-splices'])
test('T5721', normal, compile, ['-v0'])
test('T1541', normal, compile, ['-v0'])
test('T5883', normal, compile, ['-v0 -dsuppress-uniques -ddump-splices'])
test('T5882', normal, compile, ['-v0'])
test('T5886', extra_clean(['T5886a.hi','T5886a.o']),
multimod_compile, ['T5886','-v0'])
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