1(*
2    Copyright (c) 2013, 2015 David C.J. Matthews
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 version 2.1 as published by the Free Software Foundation.
7    
8    This library is distributed in the hope that it will be useful,
9    but WITHOUT ANY WARRANTY; without even the implied warranty of
10    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11    Lesser General Public License for more details.
12    
13    You should have received a copy of the GNU Lesser General Public
14    License along with this library; if not, write to the Free Software
15    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
16*)
17
18signature MatchCompilerSig =
19sig
20    type parsetree
21    type typeVarMap
22    type level
23    type codetree
24    type matchtree
25    type codeBinding
26    type lexan
27
28    type location =
29        { file: string, startLine: FixedInt.int, startPosition: FixedInt.int,
30          endLine: FixedInt.int, endPosition: FixedInt.int }
31    and matchContext =
32        { mkAddr: int->int, level: level, typeVarMap: typeVarMap, lex: lexan }
33
34    val codeMatchPatterns:
35        matchtree list * codetree * bool * location * (int -> codetree) * matchContext -> codetree * bool
36    and codeBindingPattern:
37        parsetree * codetree * location * matchContext -> codeBinding list * bool
38
39    structure Sharing:
40    sig
41        type parsetree = parsetree
42        type typeVarMap = typeVarMap
43        type level = level
44        type codetree = codetree
45        type matchtree = matchtree
46        type codeBinding = codeBinding
47        type lexan = lexan
48    end
49end;
50