1 (* Copyright (C) 2009,2014,2017 Matthew Fluet.
2 * Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
3 * Jagannathan, and Stephen Weeks.
4 * Copyright (C) 1997-2000 NEC Research Institute.
6 * MLton is released under a BSD-style license.
7 * See the file MLton-LICENSE for details.
10 signature CONST_STRUCTS =
12 structure RealX: REAL_X
13 structure WordX: WORD_X
14 structure WordXVector: WORD_X_VECTOR
15 sharing WordX = RealX.WordX = WordXVector.WordX
22 structure ConstType: CONST_TYPE
23 sharing ConstType.RealSize = RealX.RealSize
24 sharing ConstType.WordSize = WordX.WordSize
28 datatype t = Big of WordXVector.t | Small of WordX.t
29 val bigToIntInf: WordXVector.t -> IntInf.t option
30 val fromIntInf: IntInf.t -> t
31 val smallToIntInf: WordX.t -> IntInf.t option
39 | WordVector of WordXVector.t
41 val deWord: t -> WordX.t
42 val deWordOpt: t -> WordX.t option
43 val equals: t * t -> bool
44 val intInf: IntInf.t -> t
46 val layout: t -> Layout.t
47 (* lookup is for constants defined by _const, _build_const, and
48 * _command_line_const. It is set in main/compile.fun.
50 val lookup: ({default: string option,
51 name: string} * ConstType.t -> t) ref
53 val real: RealX.t -> t
54 val string: string -> t
55 val toString: t -> string
56 val word: WordX.t -> t
57 val wordVector: WordXVector.t -> t