Skip to content

Commit 9874349

Browse files
authored
Don't use let destructuring (#2)
1 parent 17c3f73 commit 9874349

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Data/Variant.purs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,8 @@ on p f g r =
8282
-- | # on (SProxy :: SProxy "baz") (\baz -> "Baz: " <> show baz)
8383
-- | ```
8484
case_ a. Variant () a
85-
case_ r = unsafeCrashWith error
86-
where
87-
Tuple tag _ = unsafeCoerce r
88-
error = "Data.Variant: pattern match failure [" <> tag <> "]"
85+
case_ r = unsafeCrashWith case unsafeCoerce r of
86+
Tuple tag _ → "Data.Variant: pattern match failure [" <> tag <> "]"
8987

9088
-- | Combinator for partial matching with a default value in case of failure.
9189
-- | ```purescript

0 commit comments

Comments
 (0)