从GHC 8.6.1开始,Stackage LTS nightly
中不再包含MissingH,这显然是由于incompatibilities和Control.Monad.Fail.MonadFail
之间的MissingH。具体来说,如果我尝试针对8.6.1解析器构建my package并手动添加MissingH(从当前分支添加,因为基于基数的限制拒绝了Hackage版本),I get:>
/home/travis/build/orome/crypto-enigma-hs/.stack-work/downloaded/cfhWTjyPvK7n/src/Data/Compression/Inflate.hs:189:14: error:
• No instance for (Control.Monad.Fail.MonadFail InfM)
arising from a do statement
with the failable pattern ‘[x]’
• In a stmt of a 'do' block: [x] <- get_bits 1
In the expression:
do [x] <- get_bits 1
return x
In an equation for ‘get_bit’:
get_bit
= do [x] <- get_bits 1
return x
|
189 | get_bit = do [x] <- get_bits 1
| ^^^^^^^^^^^^^^^^^
我不确定如何继续。我希望许多软件包都依赖MissingH,并且如果不更新,将会被淘汰出LTS。
我可以使用MissingH的替代方法吗? MissingH是否正在积极维护,我是否应该很快将其修复?
我不确定我正在使用MissingH的哪一部分(how do I figure that out in Haskell?;我认为Data.String.Utils
,至少来自那里),但是我的导入(跨所有文件)看起来像这样:
import Control.Arrow
import Control.Exception (assert)
import Control.Monad (unless)
import Control.Monad.Except
import Control.Monad.Zip
import Control.Applicative
import Data.Monoid
import Data.List
import Data.List.Split (splitOn)
import qualified Data.Map as M
import Data.Maybe
import Text.Printf (printf)
import Data.Char (toUpper)
import Data.String.Utils (replace)
import Data.Char (chr, ord)
import Data.List (sort)
import Control.Applicative
import Data.Monoid
import Data.Char
import Data.List
import Data.List.Split (chunksOf)
import Data.String.Utils (replace)
import Text.Printf (printf)
我使用的MissingH部分是否具有向后兼容的替代品?