Commit b473b251 authored by Iavor S. Diatchki's avatar Iavor S. Diatchki

Merge remote-tracking branch 'origin/master' into type-nats

parents 210cd924 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
{-# LANGUAGE PolyKinds, KindSignatures, DataKinds, GADTs #-}
module T5937 where
data SMaybe :: (k -> *) -> Maybe k -> * where
SNothing :: SMaybe s 'Nothing
SJust :: s a -> SMaybe s ('Just a)
......@@ -29,4 +29,7 @@ test('T5862', normal, compile, [''])
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, [''])
module Main where
test = seq (seq id (\a -> undefined a))
main = print (test [0])
......@@ -50,6 +50,7 @@ test('T5441', extra_clean(['T5441a.o','T5441a.hi']),
multimod_compile_and_run, ['T5441',''])
test('T5603', normal, compile_and_run, [''])
# Run this test *without* optimisation too
# Run these tests *without* optimisation too
test('T5625', [ only_ways(['normal','optasm']), exit_code(1) ], compile_and_run, [''])
test('T5587', [ only_ways(['normal','optasm']), exit_code(1) ], compile_and_run, [''])
test('T5915', only_ways(['normal','optasm']), compile_and_run, [''])
{-# 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