Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement MonadFix for Java monad #739
The implemention of
-- | Allow the result of a state transformer computation to be used (lazily) -- inside the computation. -- Note that if @f@ is strict, @'fixST' f = _|_@. fixST :: (a -> ST s a) -> ST s a fixST k = ST $ \ s -> let ans = liftST (k r) s STret _ r = ans in case ans of STret s' x -> (# s', x #)
It shouldn't be too much trouble to follow the above and write an implementation for the
It should probably be added to https://github.com/typelead/eta/blob/master/libraries/base/Java/Core.hs. PRs are welcome!