Created
July 6, 2013 20:48
-
-
Save seanparsons/5941234 to your computer and use it in GitHub Desktop.
Possible route to make for comprehensions stricter and powered by scalaz.Monad.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def strictFor[M[+_], T](forExp: M[T])(implicit mMonad: Monad[M]): M[T] = macro strictForImpl[M, T] | |
def strictForImpl[M[+_]: c.WeakTypeTag, T: c.WeakTypeTag](c: Context)(forExp: c.Expr[M[T]])(mMonad: c.Expr[Monad[M]]): c.Expr[M[T]] = { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment