We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6c8870 commit 1dba941Copy full SHA for 1dba941
templates/wrappers.hs
@@ -6,6 +6,9 @@
6
7
#if defined(ALEX_MONAD) || defined(ALEX_MONAD_BYTESTRING)
8
import Control.Applicative as App (Applicative (..))
9
+#if __GLASGOW_HASKELL__ >= 800
10
+import qualified Control.Monad.Fail as Fail
11
+#endif
12
#endif
13
14
import Data.Word (Word8)
@@ -219,6 +222,14 @@ instance Monad Alex where
219
222
Left msg -> Left msg
220
223
Right (s',a) -> unAlex (k a) s'
221
224
return = App.pure
225
+#if __GLASGOW_HASKELL__ < 800
226
+ fail = alexError
227
+#else
228
+ fail = Fail.fail
229
+
230
+instance Fail.MonadFail Alex where
231
232
233
234
alexGetInput :: Alex AlexInput
235
alexGetInput
0 commit comments