{-# LANGUAGE CPP #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ConstraintKinds #-}
module Data.Constraint.Extras where
import Data.Constraint
class ArgDict f where
type ConstraintsFor (c :: * -> Constraint) f :: Constraint
argDict :: ConstraintsFor c f => f a -> Dict (c a)
type Has c f = (ArgDict f, ConstraintsFor c f)
class Implies1 c d where
implies1 :: c a :- d a