[Haskell-beginners] type vs data, again...

Emmanuel Touzery etouzery at gmail.com
Sun Mar 17 17:08:40 CET 2013


Yes, you are right thank you. I don't know how could I miss it...

emmanuel


On Sun, Mar 17, 2013 at 4:25 PM, David McBride <toad3k at gmail.com> wrote:

> If you hover over "type Object = HashMap Text Value" in
> Data.Aeson.Types in hackage, you will see that the HashMap link links
> to
> http://hackage.haskell.org/packages/archive/unordered-containers/0.2.3.0/doc/html/Data-HashMap-Strict.html#t:HashMap
> ,
> which tells you what package it came from and what to import.
>
> On Sun, Mar 17, 2013 at 11:16 AM, Emmanuel Touzery <etouzery at gmail.com>
> wrote:
> > Thank you, that was the trick! It would be handy it there was a way
> through
> > the online hackage packages pages to click through the dependencies. I
> guess
> > you checked the .cabal by hand or used some slightly more arcane cabal
> > commands to get that information.
> >
> > Thank you again and nice rest of week-end!
> >
> > Emmanuel
> >
> >
> > On Sun, Mar 17, 2013 at 2:51 PM, Andres Löh <andres at well-typed.com>
> wrote:
> >>
> >> Hi again.
> >>
> >> >  thank you for the tip! It helps but it's not quite there yet. If you
> >> > see
> >> > the program in attachment, I can make it compile only by commenting
> the
> >> > type
> >> > declaration for the second function, otherwise it's the exact same
> error
> >> > message as before.
> >>
> >> You're probably using the wrong HashMap. There are several packages on
> >> Hackage implementing similarly-named data structures (which is
> >> confusing, I know, but such is life in a decentralized and open
> >> world). You should use what aeson is using (because that's the library
> >> defining the Object type synonym).
> >>
> >> Looking at the import list of
> >>
> >>
> >>
> http://hackage.haskell.org/packages/archive/aeson/0.6.0.2/doc/html/src/Data-Aeson-Types-Internal.html
> >>
> >> we see
> >>
> >> import Data.HashMap.Strict (HashMap)
> >>
> >> and by checking the package dependencies of aeson, we figure out that
> >> this module is provided by the unordered-containers package.
> >>
> >> Cheers,
> >>   Andres
> >>
> >> --
> >> Andres Löh, Haskell Consultant
> >> Well-Typed LLP, http://www.well-typed.com
> >>
> >> _______________________________________________
> >> Beginners mailing list
> >> Beginners at haskell.org
> >> http://www.haskell.org/mailman/listinfo/beginners
> >
> >
> >
> > _______________________________________________
> > Beginners mailing list
> > Beginners at haskell.org
> > http://www.haskell.org/mailman/listinfo/beginners
> >
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130317/205b0ec4/attachment.htm>


More information about the Beginners mailing list