Vlad Lopatin | 12 Dec 09:42 2013
Picon

GLFW/GLFW-b ambiguity

Hey guys,

I am messing with OpenGL and here's the question:

GLFW-b is supposed to be based on GLFW and extend it.  How come GLFW-b naming is ambiguous with GLFW?  GLFW-b main module is named the same as GLFW (import Graphics.UI.GLFW), making it necessary to hide one of the libraries via ghc-pkg hide, or to use a language extension in order to solve ambiguity.  I am tempted to consider it a bug, unless somebody knows a good reason for it to be called a feature.

Am I missing something?

Regards,
Vladimir
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Christiaan Baaij | 12 Dec 10:35 2013
Picon

Re: GLFW/GLFW-b ambiguity

The GLFW and GLFW-b package on hackage are _both_ wrappers around the C-library GLFW.
So, GLFW-b "extends" the GLFW C-library, _not_ the GLFW haskell package.

Hope everything is clear now.

-- Christiaan

On Dec 12, 2013, at 9:42 AM, Vlad Lopatin <madjestic13 <at> gmail.com> wrote:

> Hey guys,
> 
> I am messing with OpenGL and here's the question:
> 
> GLFW-b is supposed to be based on GLFW and extend it.  How come GLFW-b naming is ambiguous with GLFW?  GLFW-b
main module is named the same as GLFW (import Graphics.UI.GLFW), making it necessary to hide one of the
libraries via ghc-pkg hide, or to use a language extension in order to solve ambiguity.  I am tempted to
consider it a bug, unless somebody knows a good reason for it to be called a feature.
> 
> Am I missing something?
> 
> Regards,
> Vladimir
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe <at> haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
Vlad Lopatin | 12 Dec 10:55 2013
Picon

Re: GLFW/GLFW-b ambiguity

Thanks, Christiaan 

Does it mean that GLFW-b and GLFW (haskell package) are not meant to be used together?

I like some GLFW-b functionality, but I also like to be able to call some of GLFW haskell package functions.  If I try to import GLFW-b and GLFW at the same time - I get the 'ambigous name' error.  Is there a recommendation for a good coding practice here?


Regards,
Vladimir


On 12 December 2013 10:35, Christiaan Baaij <christiaan.baaij <at> gmail.com> wrote:
The GLFW and GLFW-b package on hackage are _both_ wrappers around the C-library GLFW.
So, GLFW-b "extends" the GLFW C-library, _not_ the GLFW haskell package.

Hope everything is clear now.

-- Christiaan

On Dec 12, 2013, at 9:42 AM, Vlad Lopatin <madjestic13 <at> gmail.com> wrote:

> Hey guys,
>
> I am messing with OpenGL and here's the question:
>
> GLFW-b is supposed to be based on GLFW and extend it.  How come GLFW-b naming is ambiguous with GLFW?  GLFW-b main module is named the same as GLFW (import Graphics.UI.GLFW), making it necessary to hide one of the libraries via ghc-pkg hide, or to use a language extension in order to solve ambiguity.  I am tempted to consider it a bug, unless somebody knows a good reason for it to be called a feature.
>
> Am I missing something?
>
> Regards,
> Vladimir
> _______________________________________________
> Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Christiaan Baaij | 12 Dec 11:47 2013
Picon

Re: GLFW/GLFW-b ambiguity

I can't comment on good coding practices, I only know that some people don't like the PackageImports
extension of GHC.

GLFW-b and GLFW are both simple wrapper around the C-library as far as I know, so you can use them together.
Just be careful with your version of GLFW-b, the latest releases are based on the 3.* version of the
C-library; while the GLFW package uses version 2.7.* of the C-library.

-- Christiaan

On Dec 12, 2013, at 10:55 AM, Vlad Lopatin <madjestic13 <at> gmail.com> wrote:

> Thanks, Christiaan 
> 
> Does it mean that GLFW-b and GLFW (haskell package) are not meant to be used together?
> 
> I like some GLFW-b functionality, but I also like to be able to call some of GLFW haskell package functions. 
If I try to import GLFW-b and GLFW at the same time - I get the 'ambigous name' error.  Is there a
recommendation for a good coding practice here?
> 
> 
> Regards,
> Vladimir
> 
> 
> On 12 December 2013 10:35, Christiaan Baaij <christiaan.baaij <at> gmail.com> wrote:
> The GLFW and GLFW-b package on hackage are _both_ wrappers around the C-library GLFW.
> So, GLFW-b "extends" the GLFW C-library, _not_ the GLFW haskell package.
> 
> Hope everything is clear now.
> 
> -- Christiaan
> 
> On Dec 12, 2013, at 9:42 AM, Vlad Lopatin <madjestic13 <at> gmail.com> wrote:
> 
> > Hey guys,
> >
> > I am messing with OpenGL and here's the question:
> >
> > GLFW-b is supposed to be based on GLFW and extend it.  How come GLFW-b naming is ambiguous with GLFW?  GLFW-b
main module is named the same as GLFW (import Graphics.UI.GLFW), making it necessary to hide one of the
libraries via ghc-pkg hide, or to use a language extension in order to solve ambiguity.  I am tempted to
consider it a bug, unless somebody knows a good reason for it to be called a feature.
> >
> > Am I missing something?
> >
> > Regards,
> > Vladimir
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe <at> haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
Schell Scivally | 12 Dec 17:53 2013
Picon

Re: GLFW/GLFW-b ambiguity

GLFW and GLFW-b aren't _meant_ to be used together, though I don't see why you _couldn't_ use them together. People in the #haskell-game channel on irc.freenode.net may be able to help you, as well as the package maintainers. I know Brian Lewis (glfw-b) is pretty fast to respond.


On Thu, Dec 12, 2013 at 1:55 AM, Vlad Lopatin <madjestic13 <at> gmail.com> wrote:
Thanks, Christiaan 

Does it mean that GLFW-b and GLFW (haskell package) are not meant to be used together?

I like some GLFW-b functionality, but I also like to be able to call some of GLFW haskell package functions.  If I try to import GLFW-b and GLFW at the same time - I get the 'ambigous name' error.  Is there a recommendation for a good coding practice here?


Regards,
Vladimir


On 12 December 2013 10:35, Christiaan Baaij <christiaan.baaij <at> gmail.com> wrote:

The GLFW and GLFW-b package on hackage are _both_ wrappers around the C-library GLFW.
So, GLFW-b "extends" the GLFW C-library, _not_ the GLFW haskell package.

Hope everything is clear now.

-- Christiaan

On Dec 12, 2013, at 9:42 AM, Vlad Lopatin <madjestic13 <at> gmail.com> wrote:

> Hey guys,
>
> I am messing with OpenGL and here's the question:
>
> GLFW-b is supposed to be based on GLFW and extend it.  How come GLFW-b naming is ambiguous with GLFW?  GLFW-b main module is named the same as GLFW (import Graphics.UI.GLFW), making it necessary to hide one of the libraries via ghc-pkg hide, or to use a language extension in order to solve ambiguity.  I am tempted to consider it a bug, unless somebody knows a good reason for it to be called a feature.
>
> Am I missing something?
>
> Regards,
> Vladimir
> _______________________________________________
> Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe




--
Schell Scivally
http://blog.efnx.com
http://github.com/schell
http://twitter.com/schellsan
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane