Commit 6b3d3672 authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.

TFs: T2448

parent c24feb80
{-# LANGUAGE TypeFamilies, UndecidableInstances #-}
module T2448 where
-- Demonstrates a bug in propagating type equality constraints
class VectorSpace v where
type Scalar v :: *
class VectorSpace v => InnerSpace v
instance (VectorSpace u,VectorSpace v, Scalar u ~ Scalar v) =>
VectorSpace (u,v)
where
type Scalar (u,v) = Scalar u
instance (InnerSpace u,InnerSpace v, Scalar u ~ Scalar v) => InnerSpace (u,v)
......@@ -119,3 +119,4 @@ test('OversatDecomp', normal, compile, [''])
test('T2219', normal, compile, [''])
test('T2627', normal, compile, [''])
test('T2448', normal, compile, [''])
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