Commit 32f39895 authored by Vincent Zweije's avatar Vincent Zweije
Browse files

This commit was generated by cvs2svn to compensate for changes in r690,

which included commits to RCS files with non-trunk default branches.
parent a5c46c5d
......@@ -5,7 +5,8 @@ definition module absmodule
from rule import Rule
:: Module sym pvar tsym tvar
= { typeconstructors :: [(tsym,[sym])] // All constructor symbols of each declared algebraic type
= { arities :: [(sym,Int)] // Arity of each symbol
, typeconstructors :: [(tsym,[sym])] // All constructor symbols of each declared algebraic type
, exportedsymbols :: [sym] // Exported function/constructor symbols
, typerules :: [(sym,Rule tsym tvar)] // Principal types of symbols
, stricts :: [(sym,[Bool])] // Strict arguments of functions
......
......@@ -30,7 +30,8 @@ Module implementation.
*/
:: Module sym pvar tsym tvar
= { typeconstructors :: [(tsym,[sym])] // All constructor symbols of each declared algebraic type
= { arities :: [(sym,Int)] // Arity of each symbol
, typeconstructors :: [(tsym,[sym])] // All constructor symbols of each declared algebraic type
, exportedsymbols :: [sym] // Exported function/constructor symbols
, typerules :: [(sym,Rule tsym tvar)] // Principal types of symbols
, stricts :: [(sym,[Bool])] // Strict arguments of functions
......
......@@ -153,8 +153,8 @@ typerule m sym
*/
clistrategy :: Cli ((Graph SuclSymbol SuclVariable) SuclVariable var -> Bool) -> Strategy SuclSymbol var SuclVariable answer | == var
clistrategy {typeconstructors=tcs,typerules=ts,rules=rs} matchable
= ( checkarity (typearity o maxtyperule ts) // Checks curried occurrences and strict arguments
clistrategy {arities=as,typeconstructors=tcs,typerules=ts,rules=rs} matchable
= ( checkarity (extendfn as (typearity o maxtyperule ts)) // Checks curried occurrences and strict arguments
o checklaws cleanlaws // Checks for special (hard coded) rules (+x0=x /y1=y ...)
o checkrules matchable (foldmap id [] rs) // Checks normal rewrite rules
o checkimport islocal // Checks for delta symbols
......@@ -322,13 +322,14 @@ mkcli ::
[(SuclSymbol,[Bool])]
[SuclSymbol]
[(SuclTypeSymbol,[SuclSymbol])]
[(SuclSymbol,[Rule SuclSymbol SuclVariable])]
[(SuclSymbol,(Int,[Rule SuclSymbol SuclVariable]))]
-> Cli
mkcli typerules stricts exports constrs bodies
= { typeconstructors = constrs
= { arities = map (mapsnd fst) bodies
, typeconstructors = constrs
, exportedsymbols = exports
, typerules = typerules
, stricts = stricts
, rules = bodies
, rules = map (mapsnd snd) bodies
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment