Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused names #52

Merged
merged 1 commit into from
Jun 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Data/Functor/Variant.purs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class FoldableVFRL rl row <= TraversableVFRL rl row | rl -> row where
traverseVFRL :: forall proxy f a b. Applicative f => proxy rl -> (a -> f b) -> VariantF row a -> f (VariantF row b)

instance traversableNil :: TraversableVFRL RL.Nil () where
traverseVFRL _ f = case_
traverseVFRL _ _ = case_

instance traversableCons ::
( IsSymbol k
Expand Down
3 changes: 0 additions & 3 deletions src/Data/Variant.purs
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,6 @@ instance enumVariantCons ∷ (VariantBoundedEnums rs, BoundedEnum a) ⇒ Variant
, cardinality: coerceCardinality cardinality
}

coerceA ∷ a → VariantCase
coerceA = unsafeCoerce

coerceAToMbA ∷ (a → Maybe a) → VariantCase → Maybe VariantCase
coerceAToMbA = unsafeCoerce

Expand Down
4 changes: 2 additions & 2 deletions src/Data/Variant/Internal.purs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ lookupPred (VariantRep rep) = go1
| otherwise → go2 t1 b1 d1 ts1 bs1 ds1
_, _, _ → impossible "pred"

go2 t1 b1 d1 = case _, _, _ of
go2 t1 b1 _ = case _, _, _ of
L.Cons t2 ts2, L.Cons b2 bs2, L.Cons d2 ds2
| t2 == rep.type →
case d2.pred rep.value of
Expand All @@ -193,7 +193,7 @@ lookupSucc
lookupSucc (VariantRep rep) = go
where
go = case _, _, _ of
L.Cons t1 ts1, L.Cons b1 bs1, L.Cons d1 ds1
L.Cons t1 ts1, L.Cons _ bs1, L.Cons d1 ds1
| t1 == rep.type →
case d1.succ rep.value of
Just z → Just $ VariantRep { type: t1, value: z }
Expand Down