instance-control 0.1.0.0 → 0.1.1.0
raw patch · 3 files changed
+11/−9 lines, 3 filesdep ~basedep ~transformers
Dependency ranges changed: base, transformers
Files
Control/Instances/Morph.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE TypeFamilies, DataKinds, TypeOperators, MultiParamTypeClasses, FlexibleInstances, PolyKinds, UndecidableInstances, AllowAmbiguousTypes, RankNTypes, ScopedTypeVariables, FlexibleContexts, OverlappingInstances #-} +{-# LANGUAGE TypeFamilies, DataKinds, TypeOperators, MultiParamTypeClasses, FlexibleInstances, PolyKinds, UndecidableInstances, AllowAmbiguousTypes, RankNTypes, ScopedTypeVariables, FlexibleContexts #-} module Control.Instances.Morph (GenMorph(..), Morph(..)) where @@ -106,14 +106,14 @@ -- | This class extracts a given morph from the set of rules class HasMorph r m where getMorph :: r -> m -instance HasMorph (m :+: r) m where - getMorph (c :+: r) = c -instance Monad k => HasMorph (ConnectMorph_2m a b :+: r) (ConnectMorph a (b k)) where +instance {-# OVERLAPPING #-} Monad k => HasMorph (ConnectMorph_2m a b :+: r) (ConnectMorph a (b k)) where getMorph (ConnectMorph_2m f :+: r) = ConnectMorph f -instance Monad k => HasMorph (ConnectMorph_mt t :+: r) (ConnectMorph k (t k)) where +instance {-# OVERLAPPING #-} Monad k => HasMorph (ConnectMorph_mt t :+: r) (ConnectMorph k (t k)) where getMorph (ConnectMorph_mt f :+: r) = ConnectMorph f -instance HasMorph r m => HasMorph (c :+: r) m where +instance {-# OVERLAPS #-} HasMorph r m => HasMorph (c :+: r) m where getMorph (c :+: r) = getMorph r +instance {-# OVERLAPPABLE #-} HasMorph (m :+: r) m where + getMorph (c :+: r) = c -- | Checks if the path is found to provide usable error messages class CorrectPath from to path
Control/Instances/ShortestPath.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE TypeFamilies, DataKinds, TypeOperators, MultiParamTypeClasses, FlexibleInstances, PolyKinds, UndecidableInstances, AllowAmbiguousTypes, RankNTypes, ScopedTypeVariables, FlexibleContexts, OverlappingInstances #-} +{-# LANGUAGE TypeFamilies, DataKinds, TypeOperators, MultiParamTypeClasses, FlexibleInstances, PolyKinds, UndecidableInstances, AllowAmbiguousTypes, RankNTypes, ScopedTypeVariables, FlexibleContexts #-} module Control.Instances.ShortestPath where
instance-control.cabal view
@@ -1,6 +1,6 @@ name: instance-control -version: 0.1.0.0 +version: 0.1.1.0 synopsis: Controls how the compiler searches for instances using type families. description: GHC has no capability to perform graph searches on instance definition. Because of that, transitive rules for type classes cannot be defined. This package solves the issue with @@ -27,6 +27,8 @@ other-modules: Control.Instances.TypeLevelPrelude , Control.Instances.ShortestPath other-extensions: TypeFamilies, DataKinds, TypeOperators, MultiParamTypeClasses, FlexibleInstances, PolyKinds, UndecidableInstances, AllowAmbiguousTypes, RankNTypes, ScopedTypeVariables, FlexibleContexts, OverlappingInstances - build-depends: base >=4.7 && <4.9, mtl >=2.2 && <2.3, transformers >=0.4 && <0.5 + build-depends: base >=4.9 && <5.0 + , mtl >=2.2 && <2.3 + , transformers >=0.4 && <0.6 -- hs-source-dirs: default-language: Haskell2010