-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Placeholders for use while developing Haskell code
--   
--   While working on some Haskell code, it is often useful to work
--   incrementally by inserting <tt>undefined</tt> as a placeholder for
--   missing code.
--   
--   This library provides placeholders that produce better messages when
--   evaluated at run-time and also generate compile-time warnings so that
--   they do not get forgotten so easily. For details, see
--   <a>http://github.com/ahammar/placeholders</a>
@package placeholders
@version 0.1


-- | This module defines placeholders that you can use while coding to
--   allow incomplete code to compile. They work just like
--   <a>undefined</a>, but with improved error messages and compile-time
--   warnings.
module Development.Placeholders

-- | Indicates that this piece of code has not yet been implemented.
--   
--   <pre>
--   $notImplemented = $(placeholder "Unimplemented feature")
--   </pre>
notImplemented :: Q Exp

-- | Indicates unimplemented code or a known bug with a custom message.
--   
--   <pre>
--   $(todo msg) = $(placeholder ("TODO: " ++ msg))
--   </pre>
todo :: String -> Q Exp

-- | Generates an expression of any type that, if evaluated at runtime will
--   throw a <a>PlaceholderException</a>. It is therefore similar to
--   <a>error</a>, except that the source location is automatically
--   included. Also, a warning is generated at compile time so you won't
--   forget to replace placeholders before packaging your code.
placeholder :: String -> Q Exp

-- | Similar to <a>placeholder</a>, but does not generate a compiler
--   warning. Use with care!
placeholderNoWarning :: String -> Q Exp

-- | Thrown when attempting to evaluate a placeholder at runtime.
data PlaceholderException
PlaceholderException :: String -> PlaceholderException
instance GHC.Show.Show Development.Placeholders.PlaceholderException
instance GHC.Exception.Exception Development.Placeholders.PlaceholderException
