Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Lec1.agda and Exe1.agda #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shubhamkumar13
Copy link

The current function endoFunctorVec

endoFunctorVec :  {n}  EndoFunctor λ X  Vec X n
endoFunctorVec = applicativeEndoFunctor

generates the following error
Error :

No instance of type Applicative (λ X  Vec X n) was found in scope.
when checking that the expression applicativeEndoFunctor has type
EndoFunctor (λ X  Vec X n)

and it was due to the fact the it was looking for a instance of Applicative that satisfies the type Applicative (λ X → Vec X n) which is applicativeVec but since that is not specified by the instance keyword this particular function fails to generate the instance of EndoFunctor

This PR fixes that.

add the `instance` keyword to make applicativeVec an instance of  `Applicative` record to `endoFunctorVec` useful
add the `instance` keyword to make applicativeVec an instance of  `Applicative` record to `endoFunctorVec` useful
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant