-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
While installing with Stack I get the following error:
Configuring punkt-0.1.1...
Building punkt-0.1.1...
Preprocessing library punkt-0.1.1...
[1 of 2] Compiling NLP.Punkt.Match ( lib/NLP/Punkt/Match.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/NLP/Punkt/Match.o )
lib/NLP/Punkt/Match.hs:24:5:
Non type-variable argument
in the constraint: regex-base-0.93.2:Text.Regex.Base.RegexLike.RegexLike
Regex b
(Use FlexibleContexts to permit this)
When checking that ‘chunk’ has the inferred type
chunk :: forall b.
regex-base-0.93.2:Text.Regex.Base.RegexLike.RegexLike Regex b =>
Regex -> b -> [Either b b]
In an equation for ‘re_split_impl’:
re_split_impl re str
= filter not_blank $ chunk re str
where
not_blank xs
= if xs == Left "" || xs == Right "" then False else True
chunk re str = maybe [Left str] link $ matchOnceText re str
link (pre, match, post)
= Left pre : Right (fst $ match ! 0) : chunk re post
I couldn't try it, but maybe it's just a matter of adding the suggested extension, FlexibleContexts.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels