on master help sign in
a bit more style
ffe32c7Izaak Meckler
src/CheckMatch.hs+1
@@ -250,6 +250,7 @@ checkBody interfaces =
250 do pComp <- complement region pp
250 do pComp <- complement region pp
251 go (concatMap (\q -> mapMaybe (intersection q) pComp) unhandled) ps'
251 go (concatMap (\q -> mapMaybe (intersection q) pComp) unhandled) ps'
252
252
253+
253-- Util
254-- Util
254concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b]
255concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b]
255concatMapM f =
256concatMapM f =
src/Compile.hs+5−2
@@ -47,8 +47,11 @@ compile user projectName interfaces source =
47 let body = (Module.body canonicalModule) { Module.types = types }
47 let body = (Module.body canonicalModule) { Module.types = types }
48
48
49 case CheckMatch.checkBody interfaces body of
49 case CheckMatch.checkBody interfaces body of
50+ Left (A.A r matchError) ->
50− Left (A.A r matchError) -> Result.throw r (Error.CheckMatch matchError)
51+ Result.throw r (Error.CheckMatch matchError)
52+
53+ Right matchWarnings ->
51− Right matchWarnings -> Result.addWarnings (map (A.map Warning.MatchWarning) matchWarnings) (return ())
54+ Result.addWarnings (map (A.map Warning.MatchWarning) matchWarnings) (return ())
52
55
53 return $ canonicalModule { Module.body = body }
56 return $ canonicalModule { Module.body = body }
54
57