fafe4d545226088b5a7dd861941aa7ff8ddb72b7
[hcoop/domtool2.git] / src / plugins / easy_domain.sml
1 (* HCoop Domtool (http://hcoop.sourceforge.net/)
2 * Copyright (c) 2007, Adam Chlipala
3 * Copyright (c) 2014 Clinton Ebadi <clinton@unknownlamer.org>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 *)
19
20 (* Derived directives of general use *)
21
22 structure EasyDomain :> EASY_DOMAIN = struct
23
24 open Ast
25
26 val dl = ErrorMsg.dummyLoc
27
28 val _ = Defaults.registerDefault ("WWW",
29 (TAction ((CConst "Vhost", dl),
30 StringMap.empty,
31 StringMap.empty), dl),
32 (fn () => (ESkip, dl)))
33
34 val _ = Defaults.registerDefault ("CreateWWW",
35 (TBase "bool", dl),
36 (fn () => (EVar "true", dl)))
37
38 val _ = Defaults.registerDefault ("DefaultA",
39 (TBase "bool", dl),
40 (fn () => (EVar "true", dl)))
41
42 val _ = Defaults.registerDefault ("DefaultAlias",
43 (TBase "bool", dl),
44 (fn () => (EVar "true", dl)))
45
46 val _ = Defaults.registerDefault ("DefaultAliasSource",
47 (TBase "aliasSource", dl),
48 (fn () => (EApp ((EVar "defaultSource", dl), (EString (Domain.getUser ()), dl)), dl)))
49
50 val _ = Defaults.registerDefault ("HandleMail",
51 (TBase "bool", dl),
52 (fn () => (EVar "true", dl)))
53
54 val _ = Defaults.registerDefault ("AddMX",
55 (TBase "bool", dl),
56 (fn () => (EVar "true", dl)))
57
58 val _ = Defaults.registerDefault ("DefaultWebNode",
59 (TBase "web_node", dl),
60 (fn () => (EString "navajos", dl)))
61
62 end