summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-05-02 16:17:47 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-05-02 16:17:47 +0200
commit35d5c201f7540d857956fd9459ef73706304a641 (patch)
treeab74cebf86ea469562afb94725cf7ac8e95f37bc /src
parenta487ef09981baa35cdc9c38e4b69270e88538dc6 (diff)
follow compiler API change
Diffstat (limited to 'src')
-rw-r--r--src/LambdaCube/Compiler/Parser.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/LambdaCube/Compiler/Parser.hs b/src/LambdaCube/Compiler/Parser.hs
index bf7cd330..70525cba 100644
--- a/src/LambdaCube/Compiler/Parser.hs
+++ b/src/LambdaCube/Compiler/Parser.hs
@@ -108,6 +108,11 @@ addFixity p = f <$> asks (fixityMap . desugarInfo) <*> p
108 where 108 where
109 f fm sn@(SIName_ si _ n) = SIName_ si (Just $ fromMaybe (InfixL 9) $ Map.lookup n fm) n 109 f fm sn@(SIName_ si _ n) = SIName_ si (Just $ fromMaybe (InfixL 9) $ Map.lookup n fm) n
110 110
111addFixity' :: BodyParser SIName -> BodyParser SIName
112addFixity' p = f <$> asks (fixityMap . desugarInfo) <*> p
113 where
114 f fm sn@(SIName_ si _ n) = SIName_ si (Map.lookup n fm) n
115
111addConsInfo p = join $ f <$> asks (consMap . desugarInfo) <*> p 116addConsInfo p = join $ f <$> asks (consMap . desugarInfo) <*> p
112 where 117 where
113 f adts s = do 118 f adts s = do
@@ -399,7 +404,7 @@ parseDef =
399 (af, cs) <- option (True, []) $ 404 (af, cs) <- option (True, []) $
400 (,) True . map (second $ (,) Nothing) . concat <$ reserved "where" <*> identation True (typedIds id npsd Nothing) 405 (,) True . map (second $ (,) Nothing) . concat <$ reserved "where" <*> identation True (typedIds id npsd Nothing)
401 <|> (,) False <$ reservedOp "=" <*> 406 <|> (,) False <$ reservedOp "=" <*>
402 sepBy1 ((,) <$> upperCase 407 sepBy1 ((,) <$> addFixity' upperCase
403 <*> (mkConTy True <$> braces telescopeDataFields <|> mkConTy False <$> telescope Nothing) 408 <*> (mkConTy True <$> braces telescopeDataFields <|> mkConTy False <$> telescope Nothing)
404 ) 409 )
405 (reservedOp "|") 410 (reservedOp "|")