packages feed

ghc-exactprint-0.5.0.0: tests/examples/ghc8/T10562.hs

{-# LANGUAGE GADTs, TypeFamilies #-}
module T10562 where

type family Flip a

data QueryRep qtyp a where
    QAtom :: a -> QueryRep () a
    QOp   :: QueryRep (Flip qtyp) a -> QueryRep qtyp a

instance Eq (QueryRep qtyp a) where
  (==) = error "urk"

instance (Ord a) => Ord (QueryRep qtyp a) where
  compare (QOp a) (QOp b) = a `compare` b