japesinator / Idris-Profunctors

A small profunctor library for idris
16 stars 6 forks source link

Doesn't build with Idris 1.3.1 #3

Open bgavran opened 5 years ago

bgavran commented 5 years ago

When running idris --install profunctors.ipkg I get the following error messages:

Type checking ./Data/Profunctor.idr
./Data/Profunctor.idr:40:27-51:
   |
40 |   dimap f g (Kleisli h) = Kleisli $ liftA g . h . f
   |                           ~~~~~~~~~~~~~~~~~~~~~~~~~
Can't infer explicit argument to (.)

./Data/Profunctor.idr:95:30-55:
   |
95 |   dimap ab cd (UpStar bfc) = UpStar $ map cd . bfc . ab
   |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~
Can't infer explicit argument to (.)

./Data/Profunctor.idr:98:9-12:
   |
98 |   map = rmap
   |         ~~~~
When checking right hand side of Prelude.Functor.Data.Profunctor.UpStarred f a implementation of Prelude.Functor.Functor, method map with expected type
        (a1 -> b) -> UpStarred f a a1 -> UpStarred f a b

Can't find implementation for Profunctor (UpStarred f)

./Data/Profunctor.idr:100:16-59:
    |
100 | implementation Applicative f => Applicative (UpStarred f a) where
    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When checking right hand side of Data.Profunctor.UpStarred f a implementation of Prelude.Applicative.Applicative with expected type
        Applicative (UpStarred f a)

Can't find implementation for Functor (UpStarred f a)

./Data/Profunctor.idr:104:16-47:
    |
104 | implementation Monad f => Monad (UpStarred f a) where
    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When checking right hand side of Data.Profunctor.UpStarred f a implementation of Prelude.Monad.Monad with expected type
        Monad (UpStarred f a)

Can't find implementation for Applicative (UpStarred f a)

./Data/Profunctor.idr:213:16-52:
    |
213 | implementation Monad m => Strong (Kleislimorphism m) where
    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When checking right hand side of Data.Profunctor.Kleislimorphism m implementation of Data.Profunctor.Strong with expected type
        Strong (Kleislimorphism m)

Can't find implementation for Profunctor (Kleislimorphism m)

./Data/Profunctor.idr:221:16-48:
    |
221 | implementation Functor m => Strong (UpStarred m) where
    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When checking right hand side of Data.Profunctor.UpStarred m implementation of Data.Profunctor.Strong with expected type
        Strong (UpStarred m)

Can't find implementation for Profunctor (UpStarred m)

./Data/Profunctor.idr:257:16-52:
    |
257 | implementation Monad m => Choice (Kleislimorphism m) where
    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When checking right hand side of Data.Profunctor.Kleislimorphism m implementation of Data.Profunctor.Choice with expected type
        Choice (Kleislimorphism m)

Can't find implementation for Profunctor (Kleislimorphism m)

./Data/Profunctor.idr:271:16-52:
    |
271 | implementation Applicative f => Choice (UpStarred f) where
    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When checking right hand side of Data.Profunctor.UpStarred f implementation of Data.Profunctor.Choice with expected type
        Choice (UpStarred f)

Can't find implementation for Profunctor (UpStarred f)
clayrat commented 5 years ago

This is fixed in my fork (https://github.com/clayrat/Idris-Profunctors/)

galtys commented 3 years ago

Using verson by @clayrat , i'm getting the followig error with idris 1.3.2 , any idea?

Entering directory `./src'`
Type checking ./Data/Profunctor/Traversal/Index.idr
./Data/Profunctor/Traversal/Index.idr:17:1-34:
   |
17 | Wander p => Index p (Maybe a) () a where
   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When checking type of Data.Profunctor.Traversal.Index.p, Maybe a, (), a implementation of Data.Profunctor.Traversal.Index.Index:
When checking argument m to type constructor Data.Profunctor.Traversal.Index.Index:
        No such variable Maybe

./Data/Profunctor/Traversal/Index.idr:21:1-48:
   |
21 | (Wander p, Ord k) => Index p (SortedMap k v) k v where
   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When checking type of Data.Profunctor.Traversal.Index.p, SortedMap k v, k, v implementation of Data.Profunctor.Traversal.Index.Index:
No such variable Ord

./Data/Profunctor/Traversal/Index.idr:25:1-47:
   |
25 | (Wander p, Ord a) => Index p (SortedSet a) a () where
   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When checking type of Data.Profunctor.Traversal.Index.p, SortedSet a, a, () implementation of Data.Profunctor.Traversal.Index.Index:
No such variable Ord