Coder Social home page Coder Social logo

"Couldn't match type [...] ("https://www.googleapis.com/auth/datastore" Data.Type.Equality.== "https://www.googleapis.com/auth/datastore") [...] with ‘'True’" about gogol HOT 5 OPEN

runeksvendsen avatar runeksvendsen commented on August 20, 2024 3
"Couldn't match type [...] ("https://www.googleapis.com/auth/datastore" Data.Type.Equality.== "https://www.googleapis.com/auth/datastore") [...] with ‘'True’"

from gogol.

Comments (5)

rightfold avatar rightfold commented on August 20, 2024 2

I am also experiencing this problem, quite consistently: touch a file that uses this, and it breaks. Clean and rebuild, and it works until you touch the file again.

It seems like it may be a GHC bug related to interface files and type families, but I'm not sure.

from gogol.

yoricksijsling avatar yoricksijsling commented on August 20, 2024 1

Add the following import to your file to fix this:

import GHC.TypeLits ()

It contains the following bit of code which declares the type instance that is required to compare symbols.

type family EqSymbol (a :: Symbol) (b :: Symbol) where
  EqSymbol a a = 'True
  EqSymbol a b = 'False
type instance a == b = EqSymbol a b

from gogol.

brendanhay avatar brendanhay commented on August 20, 2024

Hi @runeksvendsen, I've seen your message but I haven't had time to dig in and provide a clear example. The short version is that class constraints will propagate all the way though the code as you've seen. constraints need to be discharged - and to do that possibly an additional combinator may need to be provided.

from gogol.

runeksvendsen avatar runeksvendsen commented on August 20, 2024

Allow me to shortly summarize what I don't understand, and what leads me to think there's a bug somewhere. The error I receive is:

    • Couldn't match type ‘(("https://www.googleapis.com/auth/datastore"
                             Data.Type.Equality.== "https://www.googleapis.com/auth/cloud-platform")
                            Data.Type.Bool.|| ("https://www.googleapis.com/auth/datastore"
                                               Data.Type.Equality.== "https://www.googleapis.com/auth/datastore"))
                           Data.Type.Bool.|| Network.Google.Auth.Scope.HasScope'
                                               '[]
                                               '["https://www.googleapis.com/auth/cloud-platform",
                                                 "https://www.googleapis.com/auth/datastore"]’
                     with ‘'True’

The second sub-expression in the expression that allegedly doesn't evaluate to 'True is ("https://www.googleapis.com/auth/datastore" Data.Type.Equality.== "https://www.googleapis.com/auth/datastore") which, as far as both GHCi and I can see, should evaluate to 'True.

Please enlighten me here.

from gogol.

matthew-piziak avatar matthew-piziak commented on August 20, 2024

This is a problem for me as well. Cleaning and rebuilding works, but that takes a long time so a workaround would be appreciated.

from gogol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.