Created
June 24, 2020 19:54
-
-
Save lally/e6b08651fcb0760de414ff058db373d2 to your computer and use it in GitHub Desktop.
Ambiguous api0 with api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class QueryResult api where | |
type Query api :: * | |
addContinue :: Maybe KM.Continue -> Query api -> Query api | |
setupWithLimit :: CloudConfig -> Maybe Int -> Query api -> Query api | |
{- | |
cloud-analyzer> • Couldn't match type ‘Query api0’ with ‘Query api’ | |
cloud-analyzer> Expected type: Maybe KM.Continue -> Query api -> Query api | |
cloud-analyzer> Actual type: Maybe KM.Continue -> Query api0 -> Query api0 | |
cloud-analyzer> NB: ‘Query’ is a non-injective type family | |
cloud-analyzer> The type variable ‘api0’ is ambiguous | |
cloud-analyzer> • In the ambiguity check for ‘addContinue’ | |
cloud-analyzer> To defer the ambiguity check to use sites, enable AllowAmbiguousTypes | |
cloud-analyzer> When checking the class method: | |
cloud-analyzer> addContinue :: forall api. | |
cloud-analyzer> QueryResult api => | |
cloud-analyzer> Maybe KM.Continue -> Query api -> Query api | |
cloud-analyzer> In the class declaration for ‘QueryResult’ | |
cloud-analyzer> | | |
cloud-analyzer> 155 | addContinue :: Maybe KM.Continue -> Query api -> Query api | |
cloud-analyzer> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment