forsyde / forsyde-shallow

ForSyDe's Haskell-embedded Domain Specific Language
https://forsyde.github.io/forsyde-shallow/
BSD 3-Clause "New" or "Revised" License
12 stars 10 forks source link

Ambiguity error with GHC 8.10.3 #27

Closed Rojods closed 3 years ago

Rojods commented 3 years ago

When one tries to compile and link forsyde-shallow with LTS-17, or GHC 8.10.3, ones gets the following errors due to the latest updates to the Haskell platform and libraries:

[17 of 30] Compiling ForSyDe.Shallow.Utility.Gaussian ( src\ForSyDe\Shallow\Utility\Gaussian.hs, dist\build\ForSyDe\Shallow\Utility\Gaussian.o )
src\ForSyDe\Shallow\Utility\Gaussian.hs:64:23: error:
    Ambiguous occurrence `uniform'
    It could refer to
       either `System.Random.uniform',
              imported from `System.Random' at src\ForSyDe\Shallow\Utility\Gaussian.hs:22:1-20
           or `ForSyDe.Shallow.Utility.Gaussian.uniform',
              defined at src\ForSyDe\Shallow\Utility\Gaussian.hs:38:1
   |
64 |         (u1, sNew1) = uniform stdG
   |                       ^^^^^^^
src\ForSyDe\Shallow\Utility\Gaussian.hs:65:23: error:
    Ambiguous occurrence `uniform'
    It could refer to
       either `System.Random.uniform',
              imported from `System.Random' at src\ForSyDe\Shallow\Utility\Gaussian.hs:22:1-20
           or `ForSyDe.Shallow.Utility.Gaussian.uniform',
              defined at src\ForSyDe\Shallow\Utility\Gaussian.hs:38:1
   |
65 |         (u2, sNew2) = uniform sNew1
   |                       ^^^^^^^
cabal.exe: Failed to build forsyde-shallow-3.4.0.0. See the build log above
for details.

Therefore the function names must be changed or the import must be qualified.