1import qualified Data.Char as Char
2import Data.Word (Word16, Word32)
20instance Binary Symbol where
21 put (Symbol home name) =
32toExpr :: Symbol -> JS.Expr
33toExpr (Symbol home name) =
34 JS.DotRef (JS.ref (homeToText home)) (JS.Id (nameToText name))
37homeToText :: Word16 -> Text
39 Text.pack ('$' : show word)
42nameToText :: Word32 -> Text
44 Text.pack (makeName word "")
47makeName :: Word32 -> String -> String
50 makeChar 97 word : str
52 else if word < 52 then
53 makeChar 65 (word - 26) : str
60 makeName next (makeInnerChar leftover : str)
63makeInnerChar :: Word32 -> Char
68 makeChar 65 (word - 26)
71{-# INLINE makeChar #-}
72makeChar :: Word32 -> Word32 -> Char
74 Char.chr (fromIntegral (root + offset))
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list