mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-11-11 03:34:13 +03:00
Documentation for provided postulates
This commit is contained in:
parent
ad2f1864e4
commit
54fb787ac1
@ -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."
|
||||
|
@ -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
|
||||
|
@ -5,4 +5,7 @@ Type checking ./docs002.idr
|
||||
*docs002> T2 : Type
|
||||
Some other documentation
|
||||
|
||||
*docs002> T3 : Int
|
||||
Some provided postulate
|
||||
|
||||
*docs002> Bye bye
|
||||
|
@ -1,2 +1,3 @@
|
||||
:doc T1
|
||||
:doc T2
|
||||
:doc T3
|
||||
|
Loading…
Reference in New Issue
Block a user