summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/PGFtoJS.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-10-02 13:03:57 +0000
committerkrasimir <krasimir@chalmers.se>2010-10-02 13:03:57 +0000
commitcb8795c222ae86e4561e1009c382fe0b87e22b62 (patch)
treeeddba3e578a812347060f5f640cc49e58dc5b263 /src/compiler/GF/Compile/PGFtoJS.hs
parent72cc4ddb594599a5e3768a7b3921975542c3591a (diff)
refactor the API for random generation again. Now PGF contains probabilities in the abstract syntax
Diffstat (limited to 'src/compiler/GF/Compile/PGFtoJS.hs')
-rw-r--r--src/compiler/GF/Compile/PGFtoJS.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/GF/Compile/PGFtoJS.hs b/src/compiler/GF/Compile/PGFtoJS.hs
index b81e0c5d3..1e9b00169 100644
--- a/src/compiler/GF/Compile/PGFtoJS.hs
+++ b/src/compiler/GF/Compile/PGFtoJS.hs
@@ -33,8 +33,8 @@ pgf2js pgf =
abstract2js :: String -> Abstr -> JS.Expr
abstract2js start ds = new "GFAbstract" [JS.EStr start, JS.EObj $ map absdef2js (Map.assocs (funs ds))]
-absdef2js :: (CId,(Type,Int,Maybe [Equation])) -> JS.Property
-absdef2js (f,(typ,_,_)) =
+absdef2js :: (CId,(Type,Int,Maybe [Equation],Double)) -> JS.Property
+absdef2js (f,(typ,_,_,_)) =
let (args,cat) = M.catSkeleton typ in
JS.Prop (JS.IdentPropName (JS.Ident (showCId f))) (new "Type" [JS.EArray [JS.EStr (showCId x) | x <- args], JS.EStr (showCId cat)])