Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /dev-notes/tycons-ptnums.txt
ViewVC logotype

View of /dev-notes/tycons-ptnums.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4464 - (download) (annotate)
Thu Oct 12 00:57:10 2017 UTC (21 months ago) by dbm
File size: 2567 byte(s)
completed primops.txt, minor edits to tycons-ptnums.txt
tycons and ptnums and FLINT primtycs

In 110.81 FLINT has identifying "ptnum" values to PRIMITIVE tycons
(e.g. intTycon). These are used to translate front-end primitive
tycons to FLINT's primitive type constructors (ptyc and primtyc
in FLINT/kernel/primtyc.sml).

Files:
ElabData/basics/core-ptnum.sml  (* obsolete, deleted *)
Elaborator/basics/ptnum.sml     (* obsolete, deleted *)
ElabData/types/core-basictypes.sml  (* merged into basictypes.sml and deleted *)
Elaborator/types/basictypes.sml
FLINT/kernel/primtyc.{sig,sml}  (* mapping from primtycnum to primtyc *)

Integer ptnums are defined in ElabData/basics/core-ptnum.sml and
Elaborator/basics/ptnum.sml. These are associated with particular
primitive tycons (as the parameter to the PRIMITIVE constructor) when
these are defined in ElabData/types/core-basictypes.sml or
Elaborator/types/basictypes.sml.  The ptnums are then mapped to
FLINT's version of primitive types in FLINT/kernel/primtyc.sml.

(* mappings defined in (core-)basictypes.sml and primtyc.sml *)
[[tycon          => ptnum: int => PrimTyc.ptyc]]

arrowTycon       => ptn_arrow  => PT_ARROW
intTycon         => ptn_int31  => PT_INT31
word32Tycon      => ptn_int32  => PT_INT32
intinfTycon      => ptn_intinf => PT_INTINF
realTycon        => ptn_real   => PT_REAL
wordTycon        => ptn_int31  => PT_INT31
word8Tycon       => ptn_int31  => PT_INT31
stringTycon      => ptn_string => PT_STRING
charTycon        => ptn_int31  => PT_INT31
exnTycon         => ptn_exn    => PT_EXN
contTycon        => ptn_cont   => PT_CONT
ccontTycon       => ptn_ccont  => PT_CCONT
arrayTycon       => ptn_array  => PT_ARRAY
vectorTycon      => ptn_vector => PT_VECTOR
objectTycon      => ptn_obj    => PT_OBJ
c_functionTycon  => ptn_cfun   => PT_CFUN
word8arrayTycon  => ptn_barray => PT_BARRAY
real64arrayTycon => ptn_rarray => PT_RARRAY
spin_lockTycon   => ptn_slock  => PT_SLOCK

(datatypes with "psuedo" ptns)
refTycon  => ptn_ref => PT_REF   - in FLINT/trans/transtypes.sml
listTycon (=> ptn_list => PT_LIST; not used)
optionTycon (=> ptn_option => PT_OPTION; not used)

(special ptns; used, but no associated primitive tycons)
_ => ptn_void => PT_VOID

(unused ptns and their FLINT ptycs)
_ => ptn_etag => PT_ETAG
_ => ptn_boxed => PT_BOXED
_ => ptn_tgd => PT_TGD
_ => ptn_utgd => PT_UTGD
_ => ptn_tnsp => PT_TNSP
_ => ptn_dyn => PT_DYN


110.82 Changes
--------------

In 110.82, ptnums have been eliminated and primtyc.sml now maps
directly from front-end tycons to primtyc constructors in the
function pt_fromtyc defined in FLINT/kernel/primtyc.sml.


root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0