Skip to content

Commit

Permalink
Remove unnecessary constraints in NumericalMonoidMonad
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejpirog committed Aug 23, 2023
1 parent 1fb2c08 commit 18f9d30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Control/Monad/List/Exotic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ instance (KnownNat g, NumericalMonoidGenerators gs) => NumericalMonoidGenerators
newtype NumericalMonoidMonad (ns :: [Nat]) a = NumericalMonoidMonad { unNumericalMonoidMonad :: [a] }
deriving (Functor, Show, Eq)

deriving instance (NumericalMonoidGenerators ns) => IsString (NumericalMonoidMonad ns Char)
deriving instance IsString (NumericalMonoidMonad ns Char)

instance (NumericalMonoidGenerators ns) => Applicative (NumericalMonoidMonad ns) where
pure = return
Expand All @@ -1132,7 +1132,7 @@ instance (NumericalMonoidGenerators ns) => Monad (NumericalMonoidMonad ns) where
&& all (\xs -> isInNumericalMonoid @ns (length xs - 1)) xss = concat xss
| otherwise = []

instance (NumericalMonoidGenerators ns) => IsList (NumericalMonoidMonad ns a) where
instance IsList (NumericalMonoidMonad ns a) where
type Item (NumericalMonoidMonad ns a) = a
toList = unNumericalMonoidMonad
fromList = NumericalMonoidMonad
Expand Down

0 comments on commit 18f9d30

Please sign in to comment.