File: PkgStore.hs

package info (click to toggle)
haskell-serialise 0.2.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 596 kB
  • sloc: haskell: 6,811; makefile: 3
file content (15 lines) | stat: -rw-r--r-- 369 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# OPTIONS_GHC -fno-warn-orphans -fsimpl-tick-factor=500 #-}
module Micro.PkgStore (serialise, deserialise) where

import Micro.Types
import Data.Store as Store
import Data.ByteString as BS

serialise :: Tree -> BS.ByteString
serialise pkgs = Store.encode pkgs

deserialise :: BS.ByteString -> Tree
deserialise = (\(Right x) -> x) . Store.decode

instance Store Tree