Commit Graph

13 Commits

Author SHA1 Message Date
aarne
7372da3d7f use associativity to force more precompilation of pre expressions 2011-10-24 12:52:20 +00:00
hallgren
ed451653bd Introduce an explicit error value in the Term type
This makes it easier to treat run-time errors (e.g. caused by calls to
Predef.error) in a way that is more typical for a lazy functional language.
2011-10-20 14:36:30 +00:00
hallgren
ef4fac9d82 Compute/ConcreteLazy.hs: no need to reverse when looking up labels in records 2011-10-20 14:19:33 +00:00
hallgren
d8d60adb15 AppPredefined.hs: more readable notation for the types of primitives 2011-10-20 14:17:37 +00:00
hallgren
42ea96a5ca Remove unused function computeConcreteRec.
This also allows the parameter rec to be removed from function computeTermOpt.
(The change is made in GF.Compile.Compute.ConcreteLazy, but not in 
GF.Compile.Compute.ConcreteStrict.)
2011-09-09 12:25:27 +00:00
hallgren
875df01dc6 Add lazy version of GF.Compile.Compute.Concrete
This patch adds GF.Compile.Compute.ConcreteLazy, which replaces the Err monad
with the Identity monad. While the Err monad makes the interpreter
(hyper)strict, the Identity monad let's the interpreter inherit Haskell's
laziness.  This can give big speedups: from 50s to 1s in one example,
from ~4 minutes to ~2 minutes for the RGL.

This is still experimental and might be buggy, so it is off by default.
You can turn it on by configuring with the -fcclazy flag, e.g.

	cabal configure -fcclazy

Let me know if anything breaks.
2011-09-01 16:39:41 +00:00
aarne
6757ab2b41 reload command in shell 2011-08-25 15:58:38 +00:00
aarne
3afefb0ac9 commented Compute/Concrete with explanations 2011-08-22 17:08:07 +00:00
aarne
a3924abece Predef functions toUpper, toLower, isUpper 2011-06-02 16:10:46 +00:00
aarne
445a3aafeb Predef.error surfaces as error message in compilation and cc command 2011-02-25 17:01:10 +00:00
aarne
9b5223a06b fixed the failure to partial-evaluate pre in right-associative context 2010-12-11 16:27:35 +00:00
krasimir
710b8f1bf7 the abstract syntax for Predef.gf is now hard-coded in AppPredefined.hs 2010-07-01 15:38:16 +00:00
krasimir
e0231cbf5b reorganize the modules in GF.Compile.* 2010-07-01 14:19:32 +00:00