hset-2.2.0: Primitive list with elements of unique types.

Safe HaskellNone




class HRemove els1 els2 i | els1 i -> els2 where Source

Remove i's element from hset. Second argument is a resulting hset type


hremove :: forall proxy. proxy i -> HSet els1 -> HSet els2 Source


HRemove N ((:) * e els) els Z Source 
(NotElem * e els2, HRemove N els1 els2 i) => HRemove N ((:) * e els1) ((:) * e els2) (S i) Source 

type HDeletable e els1 els2 = HRemove els1 els2 (IndexOf e els1) Source

Delete element from HSet of specified type

>>> let x = (HSCons "sdf" $ HSCons 123 HSNil) :: HSet '[String, Int]
>>> hdelete (Proxy :: Proxy Int) x
HSCons ("sdf") (HSNil)
>>> hdelete (Proxy :: Proxy String) x
HSCons (123) (HSNil)

Constraints that e can be removed from els1 and els2 will be produced in result

hdelete :: forall proxy els1 els2 e. HDeletable e els1 els2 => proxy e -> HSet els1 -> HSet els2 Source

Delete specific element from els1 and returns HSet with els2