on master help sign in
Use NonEmpty.fromList instead of :|
commit64ee14374faf10b7e01eef6ade074339a0513131 authorJason Felice <jason.m.felice@gmail.com> dateThu 2 Nov 2017, 16:42 (9 years ago) parent01d70d7
1 file changed+5−5
src/Idris/Parser.hs+5−5
src/Idris/Parser.hs+5−5
@@ -49,7 +49,7 @@ import Data.Foldable (asum)
4949import Data.Function
5050import Data.Generics.Uniplate.Data (descendM)
5151import Data.List
52−import Data.List.NonEmpty (NonEmpty(..))
52+import qualified Data.List.NonEmpty as NonEmpty
5353import qualified Data.List.Split as Spl
5454import qualified Data.Map as M
5555import Data.Maybe
@@ -433,20 +433,20 @@ syntaxRule syn
433433 reservedHL "syntax"
434434 return sty)
435435 syms <- some syntaxSym
436− when (all isExpr syms) $ P.unexpected . P.Label $ 'm' :| "issing keywords in syntax rule"
436+ when (all isExpr syms) $ P.unexpected . P.Label . NonEmpty.fromList $ "missing keywords in syntax rule"
437437 let ns = mapMaybe getName syms
438438 when (length ns /= length (nub ns))
439− $ P.unexpected . P.Label $ 'r' :| "epeated variable in syntax rule"
439+ $ P.unexpected . P.Label . NonEmpty.fromList $ "repeated variable in syntax rule"
440440 lchar '='
441441 tm <- typeExpr (allowImp syn) >>= uniquifyBinders [n | Binding n <- syms]
442442 terminator
443443 return (Rule (mkSimple syms) tm sty)
444444 <|> do reservedHL "decl"; reservedHL "syntax"
445445 syms <- some syntaxSym
446− when (all isExpr syms) $ P.unexpected . P.Label $ 'm' :| "issing keywords in syntax rule"
446+ when (all isExpr syms) $ P.unexpected . P.Label . NonEmpty.fromList $ "missing keywords in syntax rule"
447447 let ns = mapMaybe getName syms
448448 when (length ns /= length (nub ns))
449− $ P.unexpected . P.Label $ 'r' :| "epeated variable in syntax rule"
449+ $ P.unexpected . P.Label . NonEmpty.fromList $ "repeated variable in syntax rule"
450450 lchar '='
451451 openBlock
452452 dec <- some (decl syn)