mirror of
https://code.naskya.net/repos/ndqEd
synced 2025-01-27 01:17:49 +09:00
a2468c52fd
To be honest, this is a huge patch that changes tons of stuff and probably should have been broken up into small changes. But I already had the codebase not building, so... just did all of this at once :P Basically this patch does the following: - DB migrations for ticket dependency related tables, e.g. allowing a remote author and a remote child - Allowing S2S handlers to provide an async continued processing function, which is executed and the result then added to the debug page - Most UI and functionality related to ticket deps is disabled, new implementation being added gradually via ActivityPub - Improvements to AP tools, e.g. allow to specify multiple hosts for approved forwarding when sending out an activity, and allow to specify audience of software-authored activities using a convenient human-friendly structure - Implementation of S2S sharerOfferDepF which creates a dependency under a sharer-hosted ticket/patch and sends back an Accept
43 lines
1.5 KiB
Haskell
43 lines
1.5 KiB
Haskell
{- This file is part of Vervis.
|
|
-
|
|
- Written in 2016 by fr33domlover <fr33domlover@riseup.net>.
|
|
-
|
|
- ♡ Copying is an act of love. Please copy, reuse and share.
|
|
-
|
|
- The author(s) have dedicated all copyright and related and neighboring
|
|
- rights to this software to the public domain worldwide. This software is
|
|
- distributed without any warranty.
|
|
-
|
|
- You should have received a copy of the CC0 Public Domain Dedication along
|
|
- with this software. If not, see
|
|
- <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
-}
|
|
|
|
-- | Persistent graphs are specified using the 'PersistEntityGraph' typeclass,
|
|
-- using value functions which specify fields. But the DB schema is known at
|
|
-- development time, and a specific graph needs to be picked statically. Since
|
|
-- the 'persistent' package doesn't have compile-time (e.g. type-level)
|
|
-- representation of the schema (but instead converts from TH directly to
|
|
-- datatypes), the graph related functions use a 'Proxy' which specifies the
|
|
-- graph using the type.
|
|
--
|
|
-- I don't know enough about type systems and advanced type features and GHC
|
|
-- extensions, to tell whether a better solution is possible. For now, this is
|
|
-- how things work.
|
|
--
|
|
-- This module is a helper for easily specifying graphs instead of typing the
|
|
-- proxy type directly each time, which may be long and cumbersome.
|
|
module Vervis.GraphProxy
|
|
( GraphProxy
|
|
--, ticketDepGraph
|
|
)
|
|
where
|
|
|
|
import Data.Proxy
|
|
|
|
import Vervis.Model
|
|
|
|
type GraphProxy n e = Proxy (n, e)
|
|
|
|
--ticketDepGraph :: GraphProxy Ticket TicketDependency
|
|
--ticketDepGraph = Proxy
|