1module ProjectM36.DataTypes.ByteString where
3import ProjectM36.AtomFunctionError
4import ProjectM36.AtomFunctionBody
5import qualified Data.HashSet as HS
6import qualified Data.ByteString.Base64 as B64
7import qualified Data.Text.Encoding as TE
9bytestringAtomFunctions :: AtomFunctions
10bytestringAtomFunctions = HS.fromList [
11 AtomFunction { atomFuncName = "bytestring",
12 atomFuncType = [TextAtomType, ByteStringAtomType],
13 atomFuncBody = compiledAtomFunctionBody $ \(TextAtom textIn:_) -> case B64.decode (TE.encodeUtf8 textIn) of
14 Left err -> Left (AtomFunctionBytesDecodingError err)
15 Right bs -> pure (ByteStringAtom bs)
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