Open ianbollinger opened 6 years ago
Thanks for reporting the issue. PRs more than welcome!
Something like the following? Can't test it right now:
diff --git a/src/Idris/Parser/Helpers.hs b/src/Idris/Parser/Helpers.hs
index 25a41ea7..704a6903 100644
--- a/src/Idris/Parser/Helpers.hs
+++ b/src/Idris/Parser/Helpers.hs
@@ -271,7 +271,7 @@ reservedIdentifiers = HS.fromList
identifierOrReserved :: Parsing m => m String
identifierOrReserved = token $ P.try $ do
c <- P.satisfy isAlpha <|> P.oneOf "_"
- cs <- P.many (P.satisfy isAlphaNum <|> P.oneOf "_'.")
+ cs <- P.many (P.satisfy isAlphaNum <|> P.oneOf "_'-.")
return $ c : cs
char :: Parsing m => Char -> m Char
Maybe a more sophisticated fix is needed so - is not allowed at end?
.\Data\Complex.idr:58:25-46:
724 |
72558 | (*) (a:+b) (c:+d) = ((a*c-b*d):+(b*c+a*d))
726 | ~~~~~~~~~~~~~~~~~~~~~~
727When checking right hand side of Prelude.Interfaces.Data.Complex.Complex a implementation of Prelude.Interfaces.Num, method * with expected type
728 Complex a
The proposed fix is too wide and impacts parsing of numerical operators. I've narrowed it.
Pull request #4623
@unalos should this issue be closed as having been resolved?
idris --build
will terminate with an error if an.ipkg
file references a library with a hyphen in its name. Presumably it will fail for other valid file names, but I haven't investigated yet.Steps to Reproduce
A minimal
.ipkg
file that produces the error:Expected Behavior
The package links successfully.
Observed Behavior
Workaround
Comments
I'm guessing this is a relatively trivial fix, so I'll take a look at fixing it shortly. I just wanted to document it in case I forgot about it.