build-1.1: Build Systems à la Carte
Safe HaskellSafe-Inferred
LanguageHaskell2010

Build.Task.Typed

Description

A model of polymorphic tasks, where the value type depends on the key. See the source for an example.

Synopsis

Documentation

type Task c k = forall f a. c f => Fetch k f -> k a -> Maybe (f a) Source #

A typed build task.

A side observation: we could also rewrite the type of Task into

type Task c k = forall f. c f => (forall a. k a -> f a) -> (forall a. k a -> Maybe (f a))

...which looks like a morphism between natural transformations. I'll let category theory enthusiasts explain what this strange creature is doing here.

dependencies :: ShowKey k -> Task Applicative k -> k a -> [String] Source #

Extract the names of dependencies.