summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail102.hs
blob: f4941789ffeeabd5c57a5f2efd4e0e8c56e893c6 (plain)
1
2
3
4
5
6
7
8
9
{-# LANGUAGE DatatypeContexts #-}
module ShouldFail where

import Data.Ratio

data Integral a => P a = P { p :: a }

f :: Integral a => P (Ratio a) -> P (Ratio a)
f x = x { p = p x }