anton-k / processing-for-haskell

Graphics for kids and artists. Processing implemented in Haskell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

himito opened this issue · 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

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.

Ок. Thanks. Now, i reinstall Haskell Platform. I hope this will help. 07.07.2016, 15:51, "Anton Kholomiov" notifications@github.com: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.   --Делай добро и бросай его в воду... 

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

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