1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

Move the Just into the foldMapA.

This commit is contained in:
Rob Rix 2018-05-10 18:47:04 -04:00
parent 6dcd774f1c
commit 95e90534e3

View File

@ -82,7 +82,7 @@ instance Member Fresh effects => Addressable Precise effects where
-- | 'Monovariant' locations 'alloc'ate one 'Address' per unique variable name, and 'deref'erence once per stored value, nondeterministically.
instance Members '[Fresh, NonDet] effects => Addressable Monovariant effects where
derefCell _ cell | null cell = pure Nothing
| otherwise = Just <$> foldMapA pure cell
| otherwise = foldMapA (pure . Just) cell
allocLoc = pure . Monovariant
-- | Dereference the given 'Address'in the heap, or fail if the address is uninitialized.