diff --git a/one-sided-web/src/Definitions.purs b/one-sided-web/src/Definitions.purs index 0a97885..7998d87 100644 --- a/one-sided-web/src/Definitions.purs +++ b/one-sided-web/src/Definitions.purs @@ -15,10 +15,10 @@ import Data.Map (lookup,toUnfoldable) import Driver.Definition (DriverState(..),initialDriverState, runDriverM) import Driver.Driver (runStr) import Driver.Errors (DriverError) -import Common (Modulename(..),Variable) +import Common (Modulename(..),Variable,PrdCns) import Errors (showInSrc) import Syntax.Kinded.Types (Ty) -import Syntax.Kinded.Terms (getType) +import Syntax.Kinded.Terms (getType,getPrdCns) import Syntax.Kinded.Program (Program(..),VarDecl(..),emptyProg) import Eval.Definition (EvalTrace(..)) import StandardLib (libMap) @@ -57,8 +57,8 @@ stateOutput (MkDriverState {drvDebug:db, drvEnv:_}) prog = {debugTr:intercalate getEnvTrace (Program prog') = do let progVars :: List VarDecl progVars = snd <$> toUnfoldable prog'.progVars - let varsTys :: List (Tuple Variable Ty) - varsTys = (\(VarDecl var) -> Tuple var.varName (getType var.varBody)) <$> progVars + let varsTys :: List (Tuple (Tuple PrdCns Variable) Ty) + varsTys = (\(VarDecl var) -> Tuple (Tuple (getPrdCns var.varBody) var.varName) (getType var.varBody)) <$> progVars let varsShown :: List String - varsShown = (\(Tuple v ty) -> show v <> " :: " <> show ty) <$> varsTys + varsShown = (\(Tuple (Tuple pc v) ty) -> show pc <> " " <> show v <> " :: " <> show ty) <$> varsTys intercalate "\n" varsShown diff --git a/web-app/index.js b/web-app/index.js index 2f0b086..6e945dc 100644 --- a/web-app/index.js +++ b/web-app/index.js @@ -33338,12 +33338,13 @@ cutCBN := Mu y. (MkUnit << Unit << Mu x. Done) // output/Definitions/index.js var map49 = /* @__PURE__ */ map(functorList); var toUnfoldable14 = /* @__PURE__ */ toUnfoldable2(unfoldableList); - var show60 = /* @__PURE__ */ show(showVariable); - var show128 = /* @__PURE__ */ show(showTy3); + var show60 = /* @__PURE__ */ show(showPrdCns); + var show128 = /* @__PURE__ */ show(showVariable); + var show222 = /* @__PURE__ */ show(showTy3); var intercalate21 = /* @__PURE__ */ intercalate(foldableList)(monoidString); var showInSrc2 = /* @__PURE__ */ showInSrc(errorDriverError); - var show222 = /* @__PURE__ */ show(showCommand); - var show313 = /* @__PURE__ */ show(/* @__PURE__ */ showList(showCommand)); + var show313 = /* @__PURE__ */ show(showCommand); + var show413 = /* @__PURE__ */ show(/* @__PURE__ */ showList(showCommand)); var intercalate1 = /* @__PURE__ */ intercalate(foldableMaybe)(monoidString); var lookup15 = /* @__PURE__ */ lookup(ordModulename); var ResErr = /* @__PURE__ */ function() { @@ -33388,10 +33389,10 @@ cutCBN := Mu y. (MkUnit << Unit << Mu x. Done) var getEnvTrace = function(v1) { var progVars = map49(snd)(toUnfoldable14(v1.value0.progVars)); var varsTys = map49(function(v2) { - return new Tuple(v2.value0.varName, getType(v2.value0.varBody)); + return new Tuple(new Tuple(getPrdCns(v2.value0.varBody), v2.value0.varName), getType(v2.value0.varBody)); })(progVars); var varsShown = map49(function(v2) { - return show60(v2.value0) + (" :: " + show128(v2.value1)); + return show60(v2.value0.value0) + (" " + (show128(v2.value0.value1) + (" :: " + show222(v2.value1)))); })(varsTys); return intercalate21("\n")(varsShown); }; @@ -33415,8 +33416,8 @@ cutCBN := Mu y. (MkUnit << Unit << Mu x. Done) if (v1.value0 instanceof Right) { var v2 = stateOutput(v1.value1)(v1.value0.value0.value0); return new ResSucc({ - succCmd: show222(v1.value0.value0.value1.value0), - succTrace: show313(v1.value0.value0.value1.value1), + succCmd: show313(v1.value0.value0.value1.value0), + succTrace: show413(v1.value0.value0.value1.value1), succDebug: v2.debugTr, succTypes: v2.typesTr });