mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-10-26 08:43:18 -06:00
normalStringForm now returns a list
This commit is contained in:
1 parent
e74661c592
commit
d5871b120d
1 file changed
+5
-4
@@ -50,12 +50,13 @@ normalForm globals t =
|
||||
mkFV [t] = t
|
||||
mkFV ts = FV ts
|
||||
|
||||
normalStringForm :: Globals -> Term -> Check String
|
||||
normalStringForm :: Globals -> Term -> Check [String]
|
||||
normalStringForm globals t =
|
||||
fmap toStr (runEvalM globals (fmap value2string (eval [] t [])))
|
||||
fmap toStrs (runEvalM globals (fmap value2string (eval [] t [])))
|
||||
where
|
||||
toStr [Const s] = s
|
||||
toStr _ = ""
|
||||
toStrs [] = []
|
||||
toStrs (Const s:cfs) = s : toStrs cfs
|
||||
toStrs (_ :cfs) = toStrs cfs
|
||||
|
||||
type Sigma s = Value s
|
||||
type Constraint s = Value s
|
||||
|
||||
Reference in new issue
Block a user