mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-10-25 16:43:17 -06:00
the type checker may change the arity of an equation, so we handle it differently
This commit is contained in:
1 parent
14b4e82067
commit
3f35d779f1
16 files changed
+77
-79
No files matched your search
@@ -70,7 +70,7 @@ convAbsJment (cats,funs) (name,jment) =
|
||||
fail "category with context"
|
||||
let cat = convId name
|
||||
return (cat:cats,funs)
|
||||
AbsFun (Just lt) _ oeqns _ -> do unless (null (maybe [] id oeqns)) $
|
||||
AbsFun (Just lt) oeqns -> do unless (null (maybe [] snd oeqns)) $
|
||||
fail "function with equations"
|
||||
let f = convId name
|
||||
typ <- convType (unLoc lt)
|
||||
@@ -150,7 +150,7 @@ jmentList = sortBy (compare `on` (jmentLocation.snd)) . Map.toList
|
||||
jmentLocation jment =
|
||||
case jment of
|
||||
AbsCat ctxt -> fmap loc ctxt
|
||||
AbsFun ty _ _ _ -> fmap loc ty
|
||||
AbsFun ty _ -> fmap loc ty
|
||||
ResParam ops _ -> fmap loc ops
|
||||
CncCat ty _ _ _ _ ->fmap loc ty
|
||||
ResOper ty rhs -> fmap loc rhs `mplus` fmap loc ty
|
||||
|
||||
Reference in new issue
Block a user