-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Make presentations for data types. -- @package present @version 2.1 -- | ID library. module Present.ID data ID -- | Split off the first parent from the ID. split :: ID -> (Integer, Maybe ID) -- | Try to convert from a list. fromList :: [Integer] -> Maybe ID -- | Make a singleton ID. singleton :: Integer -> ID -- | Construct an ID. cons :: Integer -> [Integer] -> ID -- | Construct an ID. snoc :: ID -> Integer -> ID instance Typeable ID instance Eq ID instance Semigroup ID instance Data ID instance Show ID instance Default ID instance ToLisp ID instance ToJSON ID -- | Presentation types. module Present.Types -- | A presentation of a level of a data type. data Presentation Integer :: !Text -> !Text -> Presentation Floating :: !Text -> !Text -> Presentation Char :: !Text -> !Text -> Presentation Alg :: !Text -> !Text -> ![(Text, ID)] -> Presentation Record :: !Text -> !Text -> ![(Text, (Text, ID))] -> Presentation Tuple :: !Text -> ![(Text, ID)] -> Presentation List :: !Text -> ![(Text, ID)] -> Presentation String :: !Text -> ![(Text, ID)] -> Presentation instance Typeable Presentation instance Show Presentation instance Data Presentation instance ToLisp Presentation instance ToJSON Presentation -- | Make presentations for data types. module Present -- | A presentation of a level of a data type. data Presentation Integer :: !Text -> !Text -> Presentation Floating :: !Text -> !Text -> Presentation Char :: !Text -> !Text -> Presentation Alg :: !Text -> !Text -> ![(Text, ID)] -> Presentation Record :: !Text -> !Text -> ![(Text, (Text, ID))] -> Presentation Tuple :: !Text -> ![(Text, ID)] -> Presentation List :: !Text -> ![(Text, ID)] -> Presentation String :: !Text -> ![(Text, ID)] -> Presentation data ID -- | Present the breadth-first level of a data type. present :: Data a => ID -> a -> Maybe Presentation -- | A helpful function for editors to force that a value is an instance of -- Data, before we actually start using it. asData :: Data a => a -> a