Documentation for provided postulates

This commit is contained in:
Adam Sandberg Eriksson 2015-03-15 15:16:12 +01:00
parent ad2f1864e4
commit 54fb787ac1
4 changed files with 9 additions and 5 deletions

View File

@ -98,11 +98,7 @@ elabProvider doc info syn fc what n
logLvl 3 $ "Elaborated provider " ++ show n ++ " as: " ++ show tm
| ProvPostulate _ <- what ->
do -- Add the postulate
elabPostulate
info syn
(fmap (const (Left $ Msg "")) .
parseDocstring $ T.pack "Provided postulate")
fc [] n (delab i tm)
elabPostulate info syn doc fc [] n (delab i tm)
logLvl 3 $ "Elaborated provided postulate " ++ show n
| otherwise ->
ierror . Msg $ "Attempted to provide a postulate where a term was expected."

View File

@ -12,5 +12,9 @@ getType _ = return (Provide Bool)
||| Some documentation
%provide (T1 : Type) with getType 0
||| Some other documentation
%provide (T2 : Type) with getType 1
||| Some provided postulate
%provide postulate T3 with getType 0

View File

@ -5,4 +5,7 @@ Type checking ./docs002.idr
*docs002> T2 : Type
Some other documentation
*docs002> T3 : Int
Some provided postulate
*docs002> Bye bye

View File

@ -1,2 +1,3 @@
:doc T1
:doc T2
:doc T3