I see. Maybe a clever macro or something could remove the need for the user to explicitly define "extern praxis FUNCTOR_f_elim" and "abstype f_name" for each functor instance?
I see. Maybe a clever macro or something could remove the need for the user to explicitly define "extern praxis FUNCTOR_f_elim" and "abstype f_name" for each functor instance?
--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/23c426ce-58fb-46f4-aa78-5644928808d8%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
let implement mapM_list_vt$fopr<a, m(b)>(x) = fopr(x)
in mapM_list_vt$aux<m_name><a, b>{m}{n}(pfm| xs) end
fun{m_name: type}{a, b: vt0ype}
mapM_list_vt$aux
{m: fvtype}
{n: int}
( pfm: MONAD(m_name, m)
| xs: list_vt(INV(a), n) ):
m(list_vt(b, n)) =
let
val () = $tempenver(fopr)
implement(a, b, s)
foldM_list_vt$fopr<a, b, s>(x, init) =
let val x = $UN.castvwtp0(x)
val init = $UN.castvwtp0(init)
in $UN.castvwtp0(fopr(x, init)) end
in foldM_list_vt$aux<m_name><a, b>{m}{n}(pfm| xs, init) end
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/6c0cbf59-8f02-45a6-8cd0-2dd677b85749%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/6c0cbf59-8f02-45a6-8cd0-2dd677b85749%40googlegroups.com.
If you use t0ype, the compiler cannot figure out the size of r, causing a compilation error.
------ Original message------
From: August Alm
Date: Wed, Apr 5, 2017 3:18 PM
To: ats-lang-users;
Subject:Re: Template-based implementation for functors
let val foo = $UN.castvwtp1{(a, b) - m(b)}(fopr)
--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/56284850-c51f-4474-b5ae-445e93960a53%40googlegroups.com.