Couldn't match expected type `()' with actual type `Int'

JeanJouX

I have a strange error with Haskell and Gtk2Hs.

I try to set the cursor position in a text entry with

set entree [entryCursorPosition := 5 ]

which correspond to the Type

entryCursorPosition :: EntryClass self => ReadAttr self Int

and I have the following error :

Couldn't match expected type `()' with actual type `Int'

Do you think it's a bug ? Do you know how to solve it?

I'm using Gtk2Hs 0.12.3 on my Debian Wheezy with GHC 7.4.1.

Best Regards.

JeanJouX

I made a mistake entryCursorPosition is a read only attribut and can't be set.

The correct function to set the cursor position in a entry is :

editableSetPosition entry (-1)

Hoping it will be helpfull

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Couldn't match expected type `Int' with actual type [Int]

From Dev

Couldn't match expected type `Int' with actual type [Int]

From Dev

Couldn't match expected type `()' with actual type `Int'

From Dev

Couldn't match expected type with actual type

From Dev

Couldn't match expected type ‘[a]’ with actual type ‘a’

From Dev

Couldn't match expected type ‘(Int, Int)’ with actual type ‘[t0]’

From Dev

Couldn't match expected type `Int' with actual type `m0 Int'

From Dev

gtk2hs: Couldn't match expected type ‘IO [Int]’ with actual type ‘[Int]’

From Dev

Couldn't match expected type `Maybe (String, Int, String)' with actual type `([Char], t0, [Char])'

From Dev

Couldn't match expected type `Maybe (String, Int, String)' with actual type `([Char], t0, [Char])'

From Dev

Haskell Couldn't match expected type ‘[(Char, b0)]’ with actual type ‘(Char, Int)’

From Dev

error Couldn't match expected type ‘Char’ with actual type ‘[Char]’

From Dev

Couldn't match expected type ‘r’ with actual type ‘Horse’

From Dev

Haskell "Couldn't match expected type ‘a’ with actual type ‘[a0]’"

From Dev

Couldn't match expected type ‘a’ with actual type ‘Double’:

From Dev

Haskell 'Couldn't match expected type with actual type'

From Dev

Couldn't match expected type `a` with actual type `Integer`

From Dev

why it shows this error: Couldn't match expected type `[a]' with actual type `a'?

From Dev

Couldn't match expected type ‘Post’ with actual type ‘Route App’

From Dev

How to convert (Integer, Int, Int ) to Day. Couldn't match expected type ‘Day’ with actual type ‘(Integer, Int, Int)’

From Dev

"Couldn't match type `Maybe' with `IO' Expected type: IO String Actual type: Maybe String" In Haskell

From Dev

"Couldn't match type `Maybe' with `IO' Expected type: IO String Actual type: Maybe String" In Haskell

From Dev

Couldn't match expected type `IO ()' with actual type `a0 -> m0 a0'

From Dev

Haskell readFile: Couldn't match expected type ‘[String]’ with actual type ‘IO String’

From Dev

Couldn't match expected type 'Data.ByteString.Lazy.Internal.ByteString' with actual type '[Char]'

From Dev

Couldn't match expected type `Data.ByteString.Internal.ByteString' with actual type `ByteString'

From Dev

Debug: Couldn't match expected type ‘GHC.Types.Bool’ with actual type ‘Bool’

From Dev

Couldn't match expected type `Data.ByteString.Internal.ByteString' with actual type `ByteString'

From Dev

Couldn't match expected type `IO ()' with actual type `a0 -> m0 a0'

Related Related

  1. 1

    Couldn't match expected type `Int' with actual type [Int]

  2. 2

    Couldn't match expected type `Int' with actual type [Int]

  3. 3

    Couldn't match expected type `()' with actual type `Int'

  4. 4

    Couldn't match expected type with actual type

  5. 5

    Couldn't match expected type ‘[a]’ with actual type ‘a’

  6. 6

    Couldn't match expected type ‘(Int, Int)’ with actual type ‘[t0]’

  7. 7

    Couldn't match expected type `Int' with actual type `m0 Int'

  8. 8

    gtk2hs: Couldn't match expected type ‘IO [Int]’ with actual type ‘[Int]’

  9. 9

    Couldn't match expected type `Maybe (String, Int, String)' with actual type `([Char], t0, [Char])'

  10. 10

    Couldn't match expected type `Maybe (String, Int, String)' with actual type `([Char], t0, [Char])'

  11. 11

    Haskell Couldn't match expected type ‘[(Char, b0)]’ with actual type ‘(Char, Int)’

  12. 12

    error Couldn't match expected type ‘Char’ with actual type ‘[Char]’

  13. 13

    Couldn't match expected type ‘r’ with actual type ‘Horse’

  14. 14

    Haskell "Couldn't match expected type ‘a’ with actual type ‘[a0]’"

  15. 15

    Couldn't match expected type ‘a’ with actual type ‘Double’:

  16. 16

    Haskell 'Couldn't match expected type with actual type'

  17. 17

    Couldn't match expected type `a` with actual type `Integer`

  18. 18

    why it shows this error: Couldn't match expected type `[a]' with actual type `a'?

  19. 19

    Couldn't match expected type ‘Post’ with actual type ‘Route App’

  20. 20

    How to convert (Integer, Int, Int ) to Day. Couldn't match expected type ‘Day’ with actual type ‘(Integer, Int, Int)’

  21. 21

    "Couldn't match type `Maybe' with `IO' Expected type: IO String Actual type: Maybe String" In Haskell

  22. 22

    "Couldn't match type `Maybe' with `IO' Expected type: IO String Actual type: Maybe String" In Haskell

  23. 23

    Couldn't match expected type `IO ()' with actual type `a0 -> m0 a0'

  24. 24

    Haskell readFile: Couldn't match expected type ‘[String]’ with actual type ‘IO String’

  25. 25

    Couldn't match expected type 'Data.ByteString.Lazy.Internal.ByteString' with actual type '[Char]'

  26. 26

    Couldn't match expected type `Data.ByteString.Internal.ByteString' with actual type `ByteString'

  27. 27

    Debug: Couldn't match expected type ‘GHC.Types.Bool’ with actual type ‘Bool’

  28. 28

    Couldn't match expected type `Data.ByteString.Internal.ByteString' with actual type `ByteString'

  29. 29

    Couldn't match expected type `IO ()' with actual type `a0 -> m0 a0'

HotTag

Archive