[xmonad] Re: [Contrib-Patch] XMonad.Actions.KeyRemap

Adam Vogt vogt.adam at gmail.com
Sun May 2 10:28:33 EDT 2010


* On Sunday, May 02 2010, Christian Dietrich wrote:

>adam vogt <vogt.adam at gmail.com> 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


More information about the xmonad mailing list