Skip to content

Instantly share code, notes, and snippets.

@madgen
Created May 6, 2016 17:30
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 madgen/e9388e64c67aad6b892265213f4e1f57 to your computer and use it in GitHub Desktop.
Save madgen/e9388e64c67aad6b892265213f4e1f57 to your computer and use it in GitHub Desktop.
stg_testMezh ( gcptr smt )
{
W_ itbl;
W_ ttype;
itbl = GET_INFO(UNTAG(smt));
ttype = TO_W_(StgInfoTable_type(itbl));
return (ttype);
}
let f x = showIntAtBase 2 intToDigit (I# (testMe# (x))) ""
f 10 -- => "0"
f Just -- => "110100100010010100110111111000"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment