haskell-chart icon indicating copy to clipboard operation
haskell-chart copied to clipboard

qualified packages import in examples would be very helpful

Open p-alik opened this issue 8 years ago • 2 comments

I got same issue #129 for example-1 and solved it by adding Chart-cairo into cabal build-depends.

Maybe qualied packages import would save time of other newcomers.

{-# LANGUAGE PackageImports    #-}

import           "Chart-cairo" Graphics.Rendering.Chart.Backend.Cairo
import           "Chart" Graphics.Rendering.Chart.Easy

p-alik avatar Jul 03 '17 15:07 p-alik

I'm unsure about qualified package imports - from the ghc manual:

You probably don’t need to use this feature, it was added mainly so that we can build backwards-compatible versions of packages when APIs change. It can lead to fragile dependencies in the common case: modules occasionally move from one package to another, rendering any package-qualified imports broken.

timbod7 avatar Jul 27 '17 22:07 timbod7

A comment about or behind the import line or thomesing?

-- Graphics.Rendering.Chart.Backend.Cairo is a part of Chart-cairo package
import Graphics.Rendering.Chart.Backend.Cairo

p-alik avatar Jul 28 '17 13:07 p-alik