T11254.hs 548 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- /tmp/panic.hs
{-# LANGUAGE FlexibleContexts        #-}
{-# LANGUAGE FlexibleInstances       #-}
{-# LANGUAGE InstanceSigs            #-}
{-# LANGUAGE TypeFamilies            #-}
{-# LANGUAGE TypeSynonymInstances    #-}
{-# LANGUAGE UndecidableSuperClasses #-}
{-# OPTIONS_GHC -fdefer-type-errors #-}

module T11254 where

class (Frac (Frac a) ~ Frac a, Fractional (Frac a), ID (Frac a)) => ID a where
  type Frac a
  embed :: a -> Frac a

instance ID Rational where
  type Frac Rational = Int
  embed :: Rational -> Rational
  embed = undefined