annotate src/core_env.sig @ 1115:150465f2895c

Database quotas
author Adam Chlipala <adamc@hcoop.net>
date Sun, 03 Jan 2010 17:13:45 -0500
parents a4979e31e4bf
children
rev   line source
adamc@16 1 (* Copyright (c) 2008, Adam Chlipala
adamc@16 2 * All rights reserved.
adamc@16 3 *
adamc@16 4 * Redistribution and use in source and binary forms, with or without
adamc@16 5 * modification, are permitted provided that the following conditions are met:
adamc@16 6 *
adamc@16 7 * - Redistributions of source code must retain the above copyright notice,
adamc@16 8 * this list of conditions and the following disclaimer.
adamc@16 9 * - Redistributions in binary form must reproduce the above copyright notice,
adamc@16 10 * this list of conditions and the following disclaimer in the documentation
adamc@16 11 * and/or other materials provided with the distribution.
adamc@16 12 * - The names of contributors may not be used to endorse or promote products
adamc@16 13 * derived from this software without specific prior written permission.
adamc@16 14 *
adamc@16 15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
adamc@16 16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
adamc@16 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
adamc@16 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
adamc@16 19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
adamc@16 20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
adamc@16 21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
adamc@16 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
adamc@16 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
adamc@16 24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
adamc@16 25 * POSSIBILITY OF SUCH DAMAGE.
adamc@16 26 *)
adamc@16 27
adamc@16 28 signature CORE_ENV = sig
adamc@16 29
adamc@20 30 val liftConInCon : int -> Core.con -> Core.con
adamc@193 31 val subConInCon : (int * Core.con) -> Core.con -> Core.con
adamc@20 32
adamc@315 33 val liftConInExp : int -> Core.exp -> Core.exp
adamc@315 34 val subConInExp : (int * Core.con) -> Core.exp -> Core.exp
adamc@315 35
adamc@443 36 val liftExpInExp : int -> Core.exp -> Core.exp
adamc@443 37 val subExpInExp : (int * Core.exp) -> Core.exp -> Core.exp
adamc@443 38
adamc@16 39 type env
adamc@16 40
adamc@16 41 val empty : env
adamc@16 42
adamc@16 43 exception UnboundRel of int
adamc@16 44 exception UnboundNamed of int
adamc@16 45
adamc@626 46 val pushKRel : env -> string -> env
adamc@626 47 val lookupKRel : env -> int -> string
adamc@626 48
adamc@16 49 val pushCRel : env -> string -> Core.kind -> env
adamc@16 50 val lookupCRel : env -> int -> string * Core.kind
adamc@16 51
adamc@16 52 val pushCNamed : env -> string -> int -> Core.kind -> Core.con option -> env
adamc@16 53 val lookupCNamed : env -> int -> string * Core.kind * Core.con option
adamc@16 54
adamc@192 55 val pushDatatype : env -> string -> int -> string list -> (string * int * Core.con option) list -> env
adamc@192 56 val lookupDatatype : env -> int -> string * string list * (string * int * Core.con option) list
adamc@168 57
adamc@192 58 val lookupConstructor : env -> int -> string * string list * Core.con option * int
adamc@177 59
adamc@16 60 val pushERel : env -> string -> Core.con -> env
adamc@16 61 val lookupERel : env -> int -> string * Core.con
adamc@16 62
adamc@109 63 val pushENamed : env -> string -> int -> Core.con -> Core.exp option -> string -> env
adamc@109 64 val lookupENamed : env -> int -> string * Core.con * Core.exp option * string
adamc@16 65
adamc@16 66 val declBinds : env -> Core.decl -> env
adamc@193 67 val patBinds : env -> Core.pat -> env
adamc@642 68
adamc@642 69 val patBindsN : Core.pat -> int
adamc@1080 70 val patBindsL : Core.pat -> (string * Core.con) list
adamc@16 71
adamc@16 72 end