Skip to content

Instantly share code, notes, and snippets.

@omochi
Created August 6, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omochi/468f599103b4535edb98 to your computer and use it in GitHub Desktop.
Save omochi/468f599103b4535edb98 to your computer and use it in GitHub Desktop.
ソース
{
"types": {
"A": {
"type": "Class",
"fields": {
"intB": {
"type": "Apply",
"target": "B",
"params": {
"T": "Int"
}
}
}
},
"B": {
"let": ["T"],
"type": "Class",
"fields": {
"t": "T"
}
}
}
}
=====
出力
Namespace(
table={
A=ClassType(
name=A
params={
}
namespace=Namespace(keys=[root, A], entry num=0)
fields={
intB=ClassType(
name=IntB
params={
}
namespace=Namespace(keys=[root, A], entry num=0)
fields={
t=RefType(
namespace=Namespace(keys=[root, A], entry num=0)
name=Int
)
}
)
}
)
B=ClassType(
name=B
params={
T=PolyType(
id=970386617
)
}
namespace=Namespace(keys=[root, B], entry num=0)
fields={
t=RefType(
namespace=Namespace(keys=[root, B], entry num=0)
name=T
)
}
)
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment