effin 0.2.1.1 → 0.2.1.2
raw patch · 3 files changed
+5/−5 lines, 3 files
Files
- effin.cabal +1/−1
- src/Data/Index.hs +1/−1
- src/Data/Union.hs +3/−3
effin.cabal view
@@ -1,5 +1,5 @@ name: effin-version: 0.2.1.1+version: 0.2.1.2 synopsis: A Typeable-free implementation of extensible effects homepage: https://github.com/YellPika/effin license: BSD3
src/Data/Index.hs view
@@ -94,6 +94,6 @@ split :: forall e l m. KnownLength l => Index (l :++ m) e -> Either (Index l e) (Index m e) split (Index i) | i < n = Left (Index i) - | otherwise = Right (Index (i - 1)) + | otherwise = Right (Index (i - n)) where n = size (Proxy :: Proxy l)
src/Data/Union.hs view
@@ -58,9 +58,9 @@ push (Union i x) = Union (Index.push i) x pop :: Union (f :+ l) a -> Either (f a) (Union l a)-pop u@(Union i x) =- case project u of- Just r -> Left r+pop (Union i x) =+ case testEquality i Index.zero of+ Just Refl -> Left x Nothing -> Right (Union (Index.pop i) x) enable :: Union (f :- l) a -> Union l a