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

Can't build example 1 without using the Easy helper functions #238

Open
swarajdash opened this issue Dec 17, 2021 · 0 comments
Open

Can't build example 1 without using the Easy helper functions #238

swarajdash opened this issue Dec 17, 2021 · 0 comments

Comments

@swarajdash
Copy link

I am trying to run example 1 with ghc-8.10.7, Chart-1.9.3, and colour-2.3.6 using the code that doesn't make use of the Easy helper functions. For this line

setLinesBlue :: PlotLines a b -> PlotLines a b
setLinesBlue = plot_lines_style  . line_color .~ opaque blue

I get the following error:

ChartEx.hs:9:50: error:
    • Couldn't match expected type ‘colour-2.3.6:Data.Colour.Internal.AlphaColour
                                      Double’
                  with actual type ‘AlphaColour a2’
      NB: ‘AlphaColour’
            is defined in ‘Data.Colour.Internal’ in package ‘colour-2.3.6’
          ‘colour-2.3.6:Data.Colour.Internal.AlphaColour’
            is defined in ‘Data.Colour.Internal’ in package ‘colour-2.3.6’
    • In the second argument of ‘(.~)’, namely ‘opaque blue’
      In the expression: plot_lines_style . line_color .~ opaque blue
      In an equation for ‘setLinesBlue’:
          setLinesBlue = plot_lines_style . line_color .~ opaque blue
  |
9 | setLinesBlue = plot_lines_style  . line_color .~ opaque blue
  |                                                  ^^^^^^^^^^^

and similar errors for the other two instances of colours in that file. The Easy version works just fine, so I'm confused why I get problems with colours here (and it doesn't even make sense to me what the error is). Has anyone seen this before? Am I missing something?

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

No branches or pull requests

1 participant