{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}

module Asset.Library
    ( Library (..)
    , module Asset.Library.Types
    , module Asset.Library.Classes
    , module Asset.Library.Instances )  where

import Asset.Library.Types
import Asset.Library.Classes
import Asset.Library.Instances

import Data.HList

-- | Renders a library label to it's final type, based on it's wrapping context.
class Library m input a renderType where
  renderLibrary :: a -> input -> m renderType




-- | @bloom@ opens up common dependencies and pulls them into global scope.
--bloom :: HList 



-- | Convert a complete tree of libraries into a graph of dependencies? 
-- Converting libraries' dependences to ()?
-- .
-- > combine (Backbone JQuery Lodash) (JQueryUI JQuery) =
-- >     1 Backbone () ()
-- >     2 JQuery
-- >     3 Lodash
-- >     4 JQueryUI ()
-- >   where
-- >     1 -> 2
-- >     1 -> 3
-- >     4 -> 2
