Mercurial > urweb
diff src/source.sml @ 30:e6ccf961d8a3
Parsing and printing basic module system
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 12 Jun 2008 14:04:22 -0400 |
parents | 9a578171de9e |
children | 44b5405e74c7 |
line wrap: on
line diff
--- a/src/source.sml Tue Jun 10 18:28:43 2008 -0400 +++ b/src/source.sml Thu Jun 12 14:04:22 2008 -0400 @@ -77,11 +77,31 @@ withtype exp = exp' located +datatype sgn_item' = + SgiConAbs of string * kind + | SgiCon of string * kind option * con + | SgiVal of string * con + | SgiStr of string * sgn + +and sgn' = + SgnConst of sgn_item list + | SgnVar of string + +withtype sgn_item = sgn_item' located +and sgn = sgn' located + datatype decl' = DCon of string * kind option * con | DVal of string * con option * exp + | DSgn of string * sgn + | DStr of string * sgn option * str + + and str' = + StrConst of decl list + | StrVar of string withtype decl = decl' located + and str = str' located type file = decl list