
2 May
2010
2 May
'10
10:28 a.m.
* On Sunday, May 02 2010, Christian Dietrich wrote:
adam vogt
writes: Lastly, the hardcoded constants could be calculated from the strings you listed with `map (fromIntegral . fromEnum)'. Leave out the fromIntegral if [Int] is the result you're looking for.
let a = (map fromEnum "abc") :: [KeySym]
<interactive>:1:13: Couldn't match expected type `KeySym' against inferred type `Int' In the first argument of `map', namely `fromEnum' In the expression: (map fromEnum "abc") :: [KeySym] In the definition of `a': a = (map fromEnum "abc") :: [KeySym]
If you can give me a way around this type issue i will fix it with pleasure.
Prelude XMonad> map (fromIntegral . fromEnum) "qwerty" :: [KeySym] [113,119,101,114,116,121] -- Adam