Skip to content

Commit 5926681

Browse files
authored
no need for Manual Newtype instance
1 parent 62742c3 commit 5926681

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Routing/Match.purs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ import Routing.Types (Route, RoutePart(..))
2323

2424
newtype Match a = Match (Route -> V (Free MatchError) (Tuple Route a))
2525

26-
-- Manual instance due to the `Route` synonym in the above
27-
instance newtypeMatch :: Newtype (Match a) (List RoutePart -> V (Free MatchError) (Tuple (List RoutePart) a)) where
28-
wrap = Match
29-
unwrap (Match m) = m
26+
derive instance newtypeMatch :: Newtype (Match a) _
3027

3128
instance matchFunctor :: Functor Match where
3229
map fn (Match r2e) = Match $ \r ->

0 commit comments

Comments
 (0)