processing-for-haskell icon indicating copy to clipboard operation
processing-for-haskell copied to clipboard

Couldn't match type ‘Double’ with ‘Foreign.C.Types.CDouble’

Open himito opened this issue 9 years ago • 4 comments

Hi, I tried to build the library but I got this problem:

[14 of 44] Compiling Graphics.Proc.Core.GLBridge ( src/Graphics/Proc/Core/GLBridge.hs, dist/build/Graphics/Proc/Core/GLBridge.o )

src/Graphics/Proc/Core/GLBridge.hs:55:10: Couldn't match type ‘Double’ with ‘Foreign.C.Types.CDouble’ Expected type: GLdouble Actual type: Double In the first argument of ‘ortho’, namely ‘(f2d xl)’ In a stmt of a 'do' block: ortho (f2d xl) (f2d xu) (f2d yl) (f2d yu) zl zu

src/Graphics/Proc/Core/GLBridge.hs:55:19: Couldn't match type ‘Double’ with ‘Foreign.C.Types.CDouble’ Expected type: GLdouble Actual type: Double In the second argument of ‘ortho’, namely ‘(f2d xu)’ In a stmt of a 'do' block: ortho (f2d xl) (f2d xu) (f2d yl) (f2d yu) zl zu

src/Graphics/Proc/Core/GLBridge.hs:55:28: Couldn't match type ‘Double’ with ‘Foreign.C.Types.CDouble’ Expected type: GLdouble Actual type: Double In the third argument of ‘ortho’, namely ‘(f2d yl)’ In a stmt of a 'do' block: ortho (f2d xl) (f2d xu) (f2d yl) (f2d yu) zl zu

src/Graphics/Proc/Core/GLBridge.hs:55:37: Couldn't match type ‘Double’ with ‘Foreign.C.Types.CDouble’ Expected type: GLdouble Actual type: Double In the fourth argument of ‘ortho’, namely ‘(f2d yu)’ In a stmt of a 'do' block: ortho (f2d xl) (f2d xu) (f2d yl) (f2d yu) zl zu

src/Graphics/Proc/Core/GLBridge.hs:73:13: No instance for (VertexComponent Double) arising from a use of ‘vertex’ In the expression: vertex In the expression: vertex $ Vertex3 (f2d x) (f2d y) 0 In an equation for ‘v2’: v2 (x, y) = vertex $ Vertex3 (f2d x) (f2d y) 0

himito avatar Jul 07 '16 11:07 himito

I guess that I need to specify versions for dependencies to make it work. Probably some packages from the dependency list are already installed on your computer and there is a version mismatch with what I use.

anton-k avatar Jul 07 '16 12:07 anton-k

Ок. Thanks. Now, i reinstall Haskell Platform. I hope this will help. 07.07.2016, 15:51, "Anton Kholomiov" [email protected]:I guess that I need to specify versions for dependencies to make it work. Probably some packages from the dependency list are already installed on your computer and there is a version mismatch with what I use.—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.   --Делай добро и бросай его в воду... 

AlexMckey avatar Jul 07 '16 13:07 AlexMckey

I hope this will help. I'm using the latest Platform. It comes with ghc-8 on board.

anton-k avatar Jul 07 '16 13:07 anton-k

Thank you so much. In a cabal sandbox works :)

himito avatar Jul 07 '16 14:07 himito