blob: ea4f59cd6b8a6cfa85f8a0b2eca83d3ee051cdc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{-# 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
|