Open ghost opened 4 years ago
We might need to use CPP
to conditionally import Data.Monoid
, or opt for something like base-compat
. In the meantime, you might be able to get away with > :unset -Wall
and then > :r
@dmjio, following your suggestion, this seems to work on 8.8.3 (but I didn't know the actual version to branch on...):
❯ git diff
diff --git a/doc/tutorial/Authentication.lhs b/doc/tutorial/Authentication.lhs
index aa339d54..affdb3b8 100644
--- a/doc/tutorial/Authentication.lhs
+++ b/doc/tutorial/Authentication.lhs
@@ -31,6 +31,7 @@ data BasicAuth (realm :: Symbol) (userData :: *)
You can use this combinator to protect an API as follows:
```haskell
+{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
@@ -47,7 +48,9 @@ module Authentication where
import Data.Aeson (ToJSON)
import Data.ByteString (ByteString)
import Data.Map (Map, fromList)
+#if (__GLASGOW_HASKELL__ < 802)
import Data.Monoid ((<>))
+#endif
import qualified Data.Map as Map
import Data.Proxy (Proxy (Proxy))
import Data.Text (Text)
We might need to use
CPP
to conditionally importData.Monoid
, or opt for something likebase-compat
. In the meantime, you might be able to get away with> :unset -Wall
and then> :r
*ApiType> :unset -Wall
don't know how to reverse -Wall
I'm following https://haskell-servant.readthedocs.io/en/stable/tutorial/index.html, and getting this message when running
cabal new-repl tutorial
. The error suggests editing the files, but I'm reluctant to do that. I assume there's something else wrong.cabal is version 3.2.0.0