goldfirere / ghc

Mirror of ghc repository. DO NOT SUBMIT PULL REQUESTS HERE
http://www.haskell.org/ghc/
Other
24 stars 1 forks source link

Higher-rank type families #28

Open goldfirere opened 9 years ago

goldfirere commented 9 years ago

This should probably work (!):

{-# LANGUAGE TypeFamilies, PolyKinds, DataKinds, TypeOperators #-}

import Data.Type.Equality

type family GCastWith (eq :: a :~: b) (x :: (a ~ b) => r) :: r where
  GCastWith 'Refl x = x