on master help sign in
Remove type class argument restriction in parser
7308d26Edwin Brady
src/Idris/Parser.hs+2−2
@@ -547,7 +547,7 @@ pClass syn = do doc <- option "" (pDocComment '|')
547 acc <- pAccessibility
547 acc <- pAccessibility
548 reserved "class"; fc <- pfc; cons <- pConstList syn; n_in <- pName
548 reserved "class"; fc <- pfc; cons <- pConstList syn; n_in <- pName
549 let n = expandNS syn n_in
549 let n = expandNS syn n_in
550− cs <- many1 carg
550+ cs <- many carg
551 reserved "where"; openBlock
551 reserved "where"; openBlock
552 ds <- many $ pFunDecl syn
552 ds <- many $ pFunDecl syn
553 closeBlock
553 closeBlock
@@ -568,7 +568,7 @@ pInstance syn = do reserved "instance"; fc <- pfc
568 return (Just n))
568 return (Just n))
569 cs <- pConstList syn
569 cs <- pConstList syn
570 cn <- pName
570 cn <- pName
571− args <- many1 (pSimpleExpr syn)
571+ args <- many (pSimpleExpr syn)
572 let sc = PApp fc (PRef fc cn) (map pexp args)
572 let sc = PApp fc (PRef fc cn) (map pexp args)
573 let t = bindList (PPi constraint) (map (\x -> (MN 0 "c", x)) cs) sc
573 let t = bindList (PPi constraint) (map (\x -> (MN 0 "c", x)) cs) sc
574 reserved "where"; openBlock
574 reserved "where"; openBlock