forked from GitHub/gf-core
overload extension: syntax overload OldModule* {def*}
This commit is contained in:
@@ -100,7 +100,7 @@ trAnyDef (i,info) = let i' = tri i in case info of
|
||||
[P.DefOper [P.DDef [mkName i'] (
|
||||
foldl P.EApp
|
||||
(P.EIdent $ tri $ cOverload)
|
||||
(map trt os ++
|
||||
(map (P.EIdent . tri) os ++
|
||||
[P.ERecord [P.LDFull [i'] (trt ty) (trt fu) | (ty,fu) <- tysts]]))]]
|
||||
|
||||
CncCat (Yes ty) Nope _ ->
|
||||
|
||||
@@ -357,7 +357,7 @@ transResDef x = case x of
|
||||
G.ResOper _ (Yes df) -> case M.appForm df of
|
||||
(keyw, ts@(_:_)) | isOverloading keyw -> case last ts of
|
||||
G.R fs ->
|
||||
[(c,p,G.ResOverload (init ts) [(ty,fu) | (_,(Just ty,fu)) <- fs])]
|
||||
[(c,p,G.ResOverload [m | G.Vr m <- ts] [(ty,fu) | (_,(Just ty,fu)) <- fs])]
|
||||
_ -> [op]
|
||||
_ -> [op]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user