Skip to content

Commit

Permalink
Define Append canonically
Browse files Browse the repository at this point in the history
it's not a workhorse for composition, so no need to add
an extra argument
  • Loading branch information
phadej committed Dec 4, 2023
1 parent 40681b2 commit 0561f0d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions optics-core/src/Optics/Internal/Optic/TypeLevel.hs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ type family Curry (xs :: IxList) (y :: Type) :: Type where

-- | Append two type-level lists together.
type family Append (xs :: [k]) (ys :: [k]) :: [k] where
Append '[] ys = ys -- needed for (<%>) and (%>)
Append xs '[] = xs -- needed for (<%)
Append '[] ys = ys
Append (x ': xs) ys = x ': Append xs ys

-- | Class that is inhabited by all type-level lists @xs@, providing the ability
Expand Down

0 comments on commit 0561f0d

Please sign in to comment.