Commit ea3df4d2 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #3460

parent 2f946237
{-# LANGUAGE TypeFamilies, FlexibleContexts #-}
module T3460 where
class Nat n where
toInt :: n -> Int
class (Nat (Arity f)) => Model f where
type Arity f
ok :: Model f => f -> Arity f -> Int
ok _ n = toInt n
bug :: (Model f, Arity f ~ n) => f -> n -> Int
bug _ n = toInt n
...@@ -163,3 +163,4 @@ test('DataFamDeriv', normal, compile, ['']) ...@@ -163,3 +163,4 @@ test('DataFamDeriv', normal, compile, [''])
test('T1769', if_compiler_lt('ghc', '7.1', expect_fail), compile, ['']) test('T1769', if_compiler_lt('ghc', '7.1', expect_fail), compile, [''])
test('T4497', normal, compile, ['']) test('T4497', normal, compile, [''])
test('T3484', normal, compile, ['']) test('T3484', normal, compile, [''])
test('T3460', 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