lookupItem :: StoreRead -> (TargetId -> Target)
lookupItem store =
    let x = storeReadBS $ storeReadType Items store
    in \(TargetId i) ->
        let i2 = fromIntegral i
            n = intFromBS $ BS.take intSize $ BS.drop i2 x
        in snd $ inputItem $ lines $ UTF8.toString $ GZip.decompress $ LBS.fromChunks $ return $ BS.take n $ BS.drop (i2 + intSize) x
lookupItem :: StoreRead -> (TargetId -> Target)
lookupItem store =
    let x = storeReadBS $ storeReadType Items store
    in \(TargetId i) ->
        let i2 = fromIntegral i
            n = intFromBS $ BS.take intSize $ BS.drop i2 x
        in snd $ inputItem $ lines $ UTF8.toString $ GZip.decompress $ LBS.fromChunks $ return $ BS.take n $ BS.drop (i2 + intSize) x
lookupItem store =
    let x = storeReadBS $ storeReadType Items store
    in \(TargetId i) ->
        let i2 = fromIntegral i
            n = intFromBS $ BS.take intSize $ BS.drop i2 x
        in snd $ inputItem $ lines $ UTF8.toString $ GZip.decompress $ LBS.fromChunks $ return $ BS.take n $ BS.drop (i2 + intSize) x