Skip to content

Commit

Permalink
Fix Merge performance (fixes #25)
Browse files Browse the repository at this point in the history
  • Loading branch information
fizruk committed Feb 6, 2016
1 parent aa9d62d commit b4b28bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Servant/Swagger/Internal/TypeLevel/API.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type Insert x xs = If (Elem x xs) xs (x ': xs)
-- | Merge two lists, ignoring any type in @xs@ which occurs also in @ys@.
type family Merge xs ys where
Merge '[] ys = ys
Merge (x ': xs) ys = Insert x (Merge xs ys)
Merge (x ': xs) ys = If (Elem x ys) (Merge xs ys) (x ': (Merge xs ys))

-- | Extract a list of unique "body" types for a specific content-type from a servant API.
type family BodyTypes c api :: [*] where
Expand Down

0 comments on commit b4b28bd

Please sign in to comment.