mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-09 11:12:51 -06:00
normalStringForm now returns a list
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user