Mercurial > meta
diff variant.ur @ 28:f55f66c6fdee
Migrate ap method to Record module.
author | Edward Z. Yang <ezyang@mit.edu> |
---|---|
date | Thu, 26 Jul 2012 16:48:37 -0400 |
parents | ca1c07d49b5e |
children | 7530b2b54353 |
line wrap: on
line diff
--- a/variant.ur Thu Jul 26 16:39:02 2012 -0400 +++ b/variant.ur Thu Jul 26 16:48:37 2012 -0400 @@ -142,4 +142,4 @@ fun declareCase [ts] [t] [a] (f : (a -> variant ts) -> a -> t) : type_case ts t a = f fun typeCase [ts] [t] (v : variant ts) (dstrs : $(map (type_case ts t) ts)) (fl : folder ts) : t (* Ur/Web not clever enough to calculate these folders, it seems *) - = match v (@ap [fn a => a -> variant ts] [fn a => a -> t] fl dstrs (@mkLabels fl)) + = match v (@Record.ap [fn a => a -> variant ts] [fn a => a -> t] fl dstrs (@mkLabels fl))