summaryrefslogtreecommitdiff
path: root/dev-haskell/mustache/files/mustache-2.4.0-ghc-8_10-fix.patch
blob: 295fcdd876f9541a4af3765593f376f6ac10554b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: hololeap <hololeap@protonmail.com>
Signed-off-by: hololeap <hololeap@protonmail.com>

Fixes a weird bug observed in a sandbox with ghc-8.10.6. This may not be
necessary on other systems.

diff -urN mustache-2.4.0/src/Text/Mustache/Parser.hs mustache-2.4.0-r1/src/Text/Mustache/Parser.hs
--- mustache-2.4.0/src/Text/Mustache/Parser.hs	2021-11-23 07:31:36.000000000 -0700
+++ mustache-2.4.0-r1/src/Text/Mustache/Parser.hs	2022-02-22 18:30:48.436611631 -0700
@@ -37,9 +37,10 @@
 
 import           Control.Monad
 import           Data.Char           (isAlphaNum, isSpace)
+import           Data.Functor.Identity
 import           Data.List           (nub)
 import           Data.Monoid         ((<>))
-import           Data.Text           as T (Text, null, pack)
+import           Data.Text           as T (Text, null, pack, uncons)
 import           Prelude             as Prel
 import           Text.Mustache.Types
 import           Text.Parsec         as P hiding (endOfLine, parse)
@@ -66,6 +67,8 @@
   | Tag (Node Text)
   | HandledTag
 
+instance {-# OVERLAPPING #-} Stream Text Identity Char where
+    uncons = return . T.uncons
 
 -- | @#@
 sectionBegin :: Char