normalStringForm now returns a list

This commit is contained in:
Krasimir Angelov
2024-02-06 07:31:19 +01:00
parent e74661c592
commit d5871b120d

View File

@@ -50,12 +50,13 @@ normalForm globals t =
mkFV [t] = t mkFV [t] = t
mkFV ts = FV ts mkFV ts = FV ts
normalStringForm :: Globals -> Term -> Check String normalStringForm :: Globals -> Term -> Check [String]
normalStringForm globals t = normalStringForm globals t =
fmap toStr (runEvalM globals (fmap value2string (eval [] t []))) fmap toStrs (runEvalM globals (fmap value2string (eval [] t [])))
where where
toStr [Const s] = s toStrs [] = []
toStr _ = "" toStrs (Const s:cfs) = s : toStrs cfs
toStrs (_ :cfs) = toStrs cfs
type Sigma s = Value s type Sigma s = Value s
type Constraint s = Value s type Constraint s = Value s