summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/CbvOverlap.hs
blob: 4e3b40f16138cc9f167c50326f32358037fdb89a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE TypeFamilies, FlexibleInstances, FlexibleContexts #-}

module CbvOverlap where

-- This is concerned with Note [Type variable cycles in Givens] and class lookup

class C a where
  meth :: a -> ()

instance C Int where
  meth _ = ()

type family F a

foo :: C (F a) => a -> Int -> ()
foo _ n = meth n