1(* 2 Copyright (c) 2009 David C. J. Matthews 2009. 3 4 This library is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Lesser General Public 6 License as published by the Free Software Foundation; either 7 version 2.1 of the License, or (at your option) any later version. 8 9 This library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 14 You should have received a copy of the GNU Lesser General Public 15 License along with this library; if not, write to the Free Software 16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17*) 18 19signature DATATYPEREPSIG = 20sig 21 type codetree 22 type types 23 type values 24 type typeConstrSet 25 type typeId 26 type typeVarForm 27 type typeVarMap 28 type level 29 30 val chooseConstrRepr : 31 (string*types) list * types list -> { constrs: codetree list, boxed: codetree, size: codetree } 32 33 type representations 34 val RefForm: representations; 35 val EnumForm: { tag: word, maxTag: word } -> representations; 36 37 val createNullaryConstructor: representations * types list * string -> codetree 38 val createUnaryConstructor: representations * types list * string -> codetree 39 40 (* Standard values *) 41 val listConstr: typeConstrSet 42 val nilConstructor: values; 43 val consConstructor: values; 44 val noneConstructor: values 45 val someConstructor: values 46 val optionConstr: typeConstrSet 47 48 val locationConstr: typeConstrSet 49 and contextConstr: typeConstrSet 50 and prettyConstr: typeConstrSet 51 52 val mkExIden: types * level * typeVarMap -> codetree 53 54 (* Types that can be shared. *) 55 structure Sharing: 56 sig 57 type codetree = codetree 58 type types = types 59 type values = values 60 type typeConstrSet = typeConstrSet 61 type typeId = typeId 62 type typeVarForm = typeVarForm 63 type typeVarMap = typeVarMap 64 type level = level 65 end 66end; 67