Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error #6

Closed
CyberSecGuy opened this issue Dec 18, 2015 · 1 comment
Closed

Compile error #6

CyberSecGuy opened this issue Dec 18, 2015 · 1 comment

Comments

@CyberSecGuy
Copy link

Hi there! I'm super excited to get this working, however after following the readme, and getting to cabal build, this is the output.

[locknlol@LockBox EnableRazer]$ cabal build
Building EnableRazer-0.0.4...
Preprocessing executable 'EnableRazer' for EnableRazer-0.0.4...
[1 of 1] Compiling Main             ( src/Main.hs, dist/build/EnableRazer/EnableRazer-tmp/Main.o )

src/Main.hs:56:3:
    Couldn't match expected type ‘Integer
                                  -> Integer -> BS.ByteString -> Timeout -> IO ()’
                with actual type ‘IO ()’
    The function ‘writeControlExact’ is applied to 8 arguments,
    but its type ‘DeviceHandle -> ControlSetup -> WriteExactAction’
    has only four
    In a stmt of a 'do' block:
      writeControlExact
        devHndl Class ToInterface _SET_REPORT 768 2 cdata noTimeout
    In the expression:
      do { putStrLn "WRITING SET_REPORT";
           writeControlExact
             devHndl Class ToInterface _SET_REPORT 768 2 cdata noTimeout }

src/Main.hs:57:5:
    Couldn't match expected type ‘ControlSetup’
                with actual type ‘RequestType’
    In the second argument of ‘writeControlExact’, namely ‘Class’
    In a stmt of a 'do' block:
      writeControlExact
        devHndl Class ToInterface _SET_REPORT 768 2 cdata noTimeout

src/Main.hs:58:5:
    Couldn't match expected type ‘BS.ByteString’
                with actual type ‘Recipient’
    In the third argument of ‘writeControlExact’, namely ‘ToInterface’
    In a stmt of a 'do' block:
      writeControlExact
        devHndl Class ToInterface _SET_REPORT 768 2 cdata noTimeout

src/Main.hs:59:5:
    Couldn't match type ‘GHC.Word.Word8’ with ‘Int’
    Expected type: Timeout
      Actual type: Request
    In the fourth argument of ‘writeControlExact’, namely ‘_SET_REPORT’
    In a stmt of a 'do' block:
      writeControlExact
        devHndl Class ToInterface _SET_REPORT 768 2 cdata noTimeout
[locknlol@LockBox EnableRazer]$ 

After following OvermindDL1's instructions here: #5

I receive this error upon build:

[locknlol@LockBox EnableRazer]$ cabal build
Building EnableRazer-0.0.4...
Preprocessing executable 'EnableRazer' for EnableRazer-0.0.4...
[1 of 1] Compiling Main             ( src/Main.hs, dist/build/EnableRazer/EnableRazer-tmp/Main.o )

src/Main.hs:65:1:
    Parse error: naked expression at top level
    Perhaps you intended to use TemplateHaskell

@CyberSecGuy
Copy link
Author

Error resolved: I screwed up the spacing when following OvermindDL1's instructions, and that must have goofed it up somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant