@@ -52,8 +52,8 @@ import Data.List.Split (splitOn)
5252import Util.Pretty(pretty, text)
5353
5454-- | Elaborate a type provider
55−elabProvider :: ElabInfo -> SyntaxInfo -> FC -> ProvideWhat -> Name -> Idris ()
56−elabProvider info syn fc what n
55+elabProvider :: Docstring (Either Err PTerm) -> ElabInfo -> SyntaxInfo -> FC -> ProvideWhat -> Name -> Idris ()
56+elabProvider doc info syn fc what n
5757 = do i <- getIState
5858 -- Ensure that the experimental extension is enabled
5959 unless (TypeProviders `elem` idris_language_extensions i) $
@@ -93,12 +93,16 @@ elabProvider info syn fc what n
9393 Provide tm
9494 | ProvTerm ty _ <- what ->
9595 do -- Finally add a top-level definition of the provided term
96− elabType info syn emptyDocstring [] fc [] n ty
96+ elabType info syn doc [] fc [] n ty
9797 elabClauses info fc [] n [PClause fc n (PApp fc (PRef fc n) []) [] (delab i tm) []]
9898 logLvl 3 $ "Elaborated provider " ++ show n ++ " as: " ++ show tm
9999 | ProvPostulate _ <- what ->
100100 do -- Add the postulate
101− elabPostulate info syn (fmap (const (Left $ Msg "")) . parseDocstring $ T.pack "Provided postulate") fc [] n (delab i tm)
101+ elabPostulate
102+ info syn
103+ (fmap (const (Left $ Msg "")) .
104+ parseDocstring $ T.pack "Provided postulate")
105+ fc [] n (delab i tm)
102106 logLvl 3 $ "Elaborated provided postulate " ++ show n
103107 | otherwise ->
104108 ierror . Msg $ "Attempted to provide a postulate where a term was expected."
@@ -120,4 +124,3 @@ elabProvider info syn fc what n
120124 case converts ctxt [] (providerOf tp) prov of
121125 OK _ -> True
122126 _ -> False
123−