Fixed a problem where operators with % in the name were screwing up an error message
This commit is contained in:
parent
2308c6571c
commit
e53da5822f
|
@ -693,6 +693,9 @@ instance ShowRain A.Replicator where
|
||||||
instance Data a => ShowRain a where
|
instance Data a => ShowRain a where
|
||||||
showRainM = tell . singleton . gshow
|
showRainM = tell . singleton . gshow
|
||||||
|
|
||||||
|
instance ShowOccam String where
|
||||||
|
showOccamM s = tell [s]
|
||||||
|
|
||||||
instance ShowOccam a => ShowOccam [a] where
|
instance ShowOccam a => ShowOccam [a] where
|
||||||
showOccamM xs = tell ["["] >> sequence (intersperse (tell [", "]) $ map
|
showOccamM xs = tell ["["] >> sequence (intersperse (tell [", "]) $ map
|
||||||
showOccamM xs) >> tell ["]"]
|
showOccamM xs) >> tell ["]"]
|
||||||
|
|
|
@ -742,7 +742,7 @@ inferTypes = occamOnlyPass "Infer types"
|
||||||
, ts `typesEqForOp` tes
|
, ts `typesEqForOp` tes
|
||||||
]
|
]
|
||||||
case possibles of
|
case possibles of
|
||||||
[] -> diePC m $ formatCode ("No matching " ++ opDescrip ++ " operator definition found for types: %") tes
|
[] -> diePC m $ formatCode "No matching % operator definition found for types: %" opDescrip tes
|
||||||
[poss] -> return $ fst poss
|
[poss] -> return $ fst poss
|
||||||
posss -> dieP m $ "Ambigious " ++ opDescrip ++ " operator, matches definitions: "
|
posss -> dieP m $ "Ambigious " ++ opDescrip ++ " operator, matches definitions: "
|
||||||
++ show (map (transformPair (A.nameMeta . fst) showOccam) posss)
|
++ show (map (transformPair (A.nameMeta . fst) showOccam) posss)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user