Commit df806942 authored by ian@well-typed.com's avatar ian@well-typed.com
Browse files

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

parents 657e24b7 08e69b59
......@@ -10,7 +10,9 @@ module FooModule where
class Concrete a b | a -> b where
bar :: a -> String
instance (Show a) => Concrete a b where
class Wuggle b | -> b -- To make the Concrete instance work
instance (Show a, Wuggle b) => Concrete a b where
bar = error "urk"
wib :: Concrete a b => a -> String
......
{-# LANGUAGE GADTs, RankNTypes, KindSignatures, PolyKinds, TypeOperators, DataKinds,
TypeFamilies #-}
module Bug where
data SBool :: Bool -> * where
SFalse :: SBool False
STrue :: SBool True
data SList :: [Bool] -> * where
SNil :: SList '[]
SCons :: SBool h -> SList t -> SList (h ': t)
type family (a :: k) :==: (b :: k) :: Bool
type instance where
'[] :==: '[] = True
(h1 ': t1) :==: (h2 ': t2) = True
a :==: b = False
(%==%) :: SList ls1 -> SList ls2 -> SBool (ls1 :==: ls2)
SNil %==% (SCons _ _) = SFalse
\ No newline at end of file
......@@ -206,5 +206,5 @@ test('T5591b', normal, compile, [''])
test('T7280', normal, compile, [''])
test('T7474', normal, compile, [''])
test('T7489', normal, compile, [''])
test('T7585', normal, compile, [''])
......@@ -20,7 +20,9 @@ data Existential (p :: KProxy k) =
class HasSingleton a (kp :: KProxy k) | a -> kp where
exists :: a -> Existential kp
instance forall a (mp :: KProxy (Maybe ak)). HasSingleton (Maybe a) mp where
class Floop a b | a -> b
instance forall a (mp :: KProxy (Maybe ak)). Floop a mp => HasSingleton (Maybe a) mp where
exists Nothing = Exists SNothing
-- instance forall (a ::*) (mp :: KProxy (Maybe ak)). HasSingleton (Maybe ak) (Maybe a) mp where
......
exists Nothing :: Existential (Maybe *) mp
exists Nothing
:: Floop * (KProxy (Maybe *)) a mp => Existential (Maybe *) mp
{-# OPTIONS_GHC -funbox-strict-fields #-}
{-# OPTIONS_GHC -O -funbox-strict-fields #-}
-- The combination of unboxing and a recursive newtype crashed GHC 6.6.1
-- Trac #1255
-- Use -O to force the unboxing to happen
module Foo where
......
......@@ -17,7 +17,7 @@ instance FooBar [] Bool Bool where
instance FooBar Maybe Int Int where
a = error "urk"
class (Monad m)=>Gr g ep m | g -> ep where
class (Monad m)=>Gr g ep m where
x:: m Int
v:: m Int
......
......@@ -5,7 +5,7 @@ module T5684 where
class B a b | a -> b where
op :: a -> b -> ()
class A a
class A a | -> a
instance A b => B Bool b
......
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