Skip to content

Heatmap Example just isn't building  #48

@MilesLitteral

Description

@MilesLitteral

I made a test to use the heatmap example in:

import Plots
import Linear.V2 
import Control.Lens

main :: IO ()
main = do
    let xs = [[1,2,3],[4,5,6]]
    heatMap xs $ heatMapSize .= V2 10 10

But it fails and is unbuildable with the following errors:

    • No instance for (base-4.15.1.0:Data.Typeable.Internal.Typeable
                         a0)
        arising from a use of ‘heatMap’
    • In the first argument of ‘($)’, namely ‘heatMap xs’
      In a stmt of a 'do' block: heatMap xs $ (heatMapSize .= V2 10 10)
      In the expression:
        do let xs = ...
           heatMap xs $ (heatMapSize .= V2 10 10)
   |
19 |     heatMap xs $ (heatMapSize .= V2 10 10)


    • Ambiguous type variable ‘a0’ arising from the literal ‘10’
      prevents the constraint ‘(Num a0)’ from being solved.
      Probable fix: use a type annotation to specify what ‘a0’ should be.
      These potential instances exist:
        instance Num a => Num (Identity a)
          -- Defined in ‘Data.Functor.Identity’
        instance Num a => Num (V2 a) -- Defined in ‘Linear.V2’
        instance Num Integer -- Defined in ‘GHC.Num’
        ...plus four others
        ...plus 10 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    • In the first argument of ‘V2’, namely ‘10’
      In the second argument of ‘(.=)’, namely ‘V2 10 10’
      In the second argument of ‘($)’, namely ‘(heatMapSize .= V2 10 10)’
   |
19 |     heatMap xs $ (heatMapSize .= V2 10 10)
   |                                     ^^

I took out heatMapAxis because it keeps complaining that it's constraint (Axis B V2 Double)
is unsolvable in terms of B and I don't understand how to remedy it not finding a backend.
There doesn't seem to be a lens for it, or any reference to the backend being used but
considering it's capitalized there has to be something?

Any advice is appreciated, Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions