DataKind Unions
I'm not sure if it is the right terminology, but is it possible to declare function types that take in an 'union' of datakinds? For example, I know I can do the following: {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} ... data Shape' = Circle' | Square' | Triangle' data Shape :: Shape' -> * where Circle :: { radius :: Int} -> Shape Circle' Square :: { side :: Int} -> Shape Square' Triangle :: { a :: Int , b :: Int , c :: Int} -> Shape Triangle' test1 :: Shape Circle' -> Int test1 = undefined However, what if I want to take in a shape that is either a circle or a square? What if I also want