cardano-base icon indicating copy to clipboard operation
cardano-base copied to clipboard

`cardano-prelude` does not build with `protolude-0.3.1` or `0.3.2`

Open coot opened this issue 3 years ago • 0 comments
trafficstars

protolude >= 0.3.1 has a more polymorphic

readEither :: (Read a, StringConv String e, StringConv e String) => e -> Either e a

which leads to various errors:

src/Cardano/Prelude/Json/Canonical.hs:110:14: error:
    • Could not deduce (Buildable e2)
        arising from a use of ‘parseJSString’
      from the context: ReportSchemaErrors m
        bound by the instance declaration
        at src/Cardano/Prelude/Json/Canonical.hs:109:10-50
      The type variable ‘e2’ is ambiguous
      These potential instances exist:
        instance Buildable Void -- Defined in ‘Formatting.Buildable’
        instance Buildable IntPtr -- Defined in ‘Formatting.Buildable’
        instance Buildable WordPtr -- Defined in ‘Formatting.Buildable’
        ...plus 24 others
        ...plus 12 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    • In the expression: parseJSString (readEither . toS)
      In an equation for ‘fromJSON’:
          fromJSON = parseJSString (readEither . toS)
      In the instance declaration for ‘FromJSON m Word64’
    |
110 |   fromJSON = parseJSString (readEither . toS)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


...

coot avatar Jun 24 '22 04:06 coot