typelevel 1.0.1 → 1.0.2
raw patch · 2 files changed
+28/−2 lines, 2 files
Files
- src/Constraint/Container/Homo.hs +25/−0
- typelevel.cabal +3/−2
+ src/Constraint/Container/Homo.hs view
@@ -0,0 +1,25 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE EmptyDataDecls #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}+{-# LANGUAGE UndecidableInstances #-}+{-# LANGUAGE PolyKinds #-}++module Constraint.Container.Homo where++import Data.Typeable+import Prelude+import GHC.Exts (Constraint)+import GHC.TypeLits+import Type.Bool++-- === Constraints ===++type family Homo (a :: *) :: Constraint++-- TODO [WD] TH+type instance Homo (t,t2) = (t~t2)+type instance Homo (t,t2,t3) = (t~t2, t~t3)+type instance Homo (t,t2,t3,t4) = (t~t2, t~t3, t~t4)+type instance Homo (t,t2,t3,t4,t5) = (t~t2, t~t3, t~t4, t~t5)+-- ...
typelevel.cabal view
@@ -1,5 +1,5 @@ name: typelevel-version: 1.0.1+version: 1.0.2 synopsis: Useful type level operations (type families and related operators). -- description: license: Apache-2.0@@ -45,7 +45,8 @@ ViewPatterns TypeFamilies - exposed-modules: Type.Bool+ exposed-modules: Constraint.Container.Homo + , Type.Bool , Type.List build-depends: base >=4.6 && <4.9