超类上下文中的非法约束(GHC 8.0.1)

时间:2016-12-16 21:02:37

标签: haskell ghc typeclass type-families

所以我有这个代码抛出一个我无法找到任何信息的错误。这是代码:

{-# LANGUAGE DataKinds #-}
module Main where
import Network.Google

class ( HasScope '["https://www.googleapis.com/auth/datastore"] a
      , GoogleRequest a) 
      => IsRequest a

这是错误:

• Illegal constraint ‘HasScope
                    '["https://www.googleapis.com/auth/datastore"]
                    a’ in a superclass context
(Use UndecidableInstances to permit this)
• In the context: (HasScope
                 '["https://www.googleapis.com/auth/datastore"] a,
               GoogleRequest a)
While checking the super-classes of class ‘IsRequest’
In the class declaration for ‘IsRequest’

这里发生了什么?我正在使用GHC 8.0.1。

0 个答案:

没有答案
相关问题