Skip to content

Commit

Permalink
small changes before making a big change from separate pacakge
Browse files Browse the repository at this point in the history
  • Loading branch information
mstksg committed Aug 9, 2019
1 parent 5028ea8 commit f7ac362
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Data/Type/Predicate/Auto.hs
Original file line number Diff line number Diff line change
Expand Up @@ -339,3 +339,4 @@ autoNotAll = anyNotNotAll sing . autoAny
instance (SingI as, AutoAll f (Not (Found p)) as) => Auto (Not (Found (AnyMatch f p))) as where
auto = mapRefuted (\(s :&: WitAny i p) -> WitAny i (s :&: p))
$ auto @_ @(Not (Any f (Found p))) @as

4 changes: 2 additions & 2 deletions src/Data/Type/Universe/Prod.hs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ instance (V.ReifyConstraint Show f (S.MaybeToList as)) => Show (PMaybe f as) whe
showsPrec d = \case
PNothing -> showString "PNothing"
PJust x -> case V.reifyConstraint @Show (x :& RNil) of
V.Compose (V.Dict y) :& RNil -> showsUnaryWith showsPrec "PJust" d y
V.Compose (V.Dict _) :& RNil -> showsUnaryWith showsPrec "PJust" d x

type instance Elem Maybe = IJust
type instance Prod Maybe = PMaybe
Expand Down Expand Up @@ -469,7 +469,7 @@ instance (V.ReifyConstraint Show f (S.Rights '[as])) => Show (PEither f as) wher
showsPrec d = \case
PLeft -> showString "PNothing"
PRight x -> case V.reifyConstraint @Show (x :& RNil) of
V.Compose (V.Dict y) :& RNil -> showsUnaryWith showsPrec "PRight" d y
V.Compose (V.Dict _) :& RNil -> showsUnaryWith showsPrec "PRight" d x

instance Provable (TyPred (PEither Sing)) where
prove = singProd
Expand Down

0 comments on commit f7ac362

Please sign in to comment.