@@ -38,8 +38,9 @@ checkDef fc ns = do ctxt <- getContext
38 mapM (\(n, t) -> do (t', _) <- recheckC fc [] t
38 mapM (\(n, t) -> do (t', _) <- recheckC fc [] t
39 return (n, t')) ns
39 return (n, t')) ns
41−elabType :: ElabInfo -> SyntaxInfo -> FC -> FnOpts -> Name -> PTerm -> Idris ()
41+elabType :: ElabInfo -> SyntaxInfo -> String ->
42+ FC -> FnOpts -> Name -> PTerm -> Idris ()
42−elabType info syn fc opts n ty' = {- let ty' = piBind (params info) ty_in
43+elabType info syn doc fc opts n ty' = {- let ty' = piBind (params info) ty_in
43 n = liftname info n_in in -}
44 n = liftname info n_in in -}
44 do checkUndefined fc n
45 do checkUndefined fc n
45 ctxt <- getContext
46 ctxt <- getContext
@@ -75,8 +76,8 @@ elabType info syn fc opts n ty' = {- let ty' = piBind (params info) ty_in
75 when corec $ do setAccessibility n Frozen
76 when corec $ do setAccessibility n Frozen
76 addIBC (IBCAccess n Frozen)
77 addIBC (IBCAccess n Frozen)
78−elabData :: ElabInfo -> SyntaxInfo -> FC -> Bool -> PData -> Idris ()
79+elabData :: ElabInfo -> SyntaxInfo -> String -> FC -> Bool -> PData -> Idris ()
79−elabData info syn fc codata (PLaterdecl n t_in)
80+elabData info syn doc fc codata (PLaterdecl n t_in)
80 = do iLOG (show fc)
81 = do iLOG (show fc)
81 checkUndefined fc n
82 checkUndefined fc n
82 ctxt <- getContext
83 ctxt <- getContext
@@ -92,7 +93,7 @@ elabData info syn fc codata (PLaterdecl n t_in)
92 logLvl 2 $ "---> " ++ show cty
93 logLvl 2 $ "---> " ++ show cty
93 updateContext (addTyDecl n cty) -- temporary, to check cons
94 updateContext (addTyDecl n cty) -- temporary, to check cons
95−elabData info syn fc codata (PDatadecl n t_in dcons)
96+elabData info syn doc fc codata (PDatadecl n t_in dcons)
96 = do iLOG (show fc)
97 = do iLOG (show fc)
97 undef <- isUndefined fc n
98 undef <- isUndefined fc n
98 ctxt <- getContext
99 ctxt <- getContext
@@ -119,10 +120,10 @@ elabData info syn fc codata (PDatadecl n t_in dcons)
119 updateContext (addDatatype (Data n ttag cty cons))
120 updateContext (addDatatype (Data n ttag cty cons))
120 mapM_ (checkPositive n) cons
121 mapM_ (checkPositive n) cons
122−elabRecord :: ElabInfo -> SyntaxInfo -> FC -> Name ->
123+elabRecord :: ElabInfo -> SyntaxInfo -> String -> FC -> Name ->
123− PTerm -> Name -> PTerm -> Idris ()
124+ PTerm -> String -> Name -> PTerm -> Idris ()
124−elabRecord info syn fc tyn ty cn cty
125+elabRecord info syn doc fc tyn ty cdoc cn cty
125− = do elabData info syn fc False (PDatadecl tyn ty [(cn, cty, fc)])
126+ = do elabData info syn doc fc False (PDatadecl tyn ty [(cdoc, cn, cty, fc)])
126 cty' <- implicit syn cn cty
127 cty' <- implicit syn cn cty
128 cty <- case lookupTy Nothing cn (tt_ctxt i) of
129 cty <- case lookupTy Nothing cn (tt_ctxt i) of
@@ -145,7 +146,7 @@ elabRecord info syn fc tyn ty cn cty
146-- syn = syn_in { syn_namespace = show (nsroot tyn) : syn_namespace syn_in }
147-- syn = syn_in { syn_namespace = show (nsroot tyn) : syn_namespace syn_in }
148− isNonImp (PExp _ _ _, a) = Just a
149+ isNonImp (PExp _ _ _ _, a) = Just a
149 isNonImp _ = Nothing
150 isNonImp _ = Nothing
151 tryElabDecl info (fn, ty, val)
152 tryElabDecl info (fn, ty, val)
@@ -157,15 +158,15 @@ elabRecord info syn fc tyn ty cn cty
157 show fn ++ " (" ++ show ty ++ ")"
158 show fn ++ " (" ++ show ty ++ ")"
160− getImplB k (PPi (Imp l s) n Placeholder sc)
161+ getImplB k (PPi (Imp l s _) n Placeholder sc)
161 = getImplB k sc
162 = getImplB k sc
162− getImplB k (PPi (Imp l s) n ty sc)
163+ getImplB k (PPi (Imp l s d) n ty sc)
163− = getImplB (\x -> k (PPi (Imp l s) n ty x)) sc
164+ = getImplB (\x -> k (PPi (Imp l s d) n ty x)) sc
164 getImplB k (PPi _ n ty sc)
165 getImplB k (PPi _ n ty sc)
165 = getImplB k sc
166 = getImplB k sc
166 getImplB k _ = k
167 getImplB k _ = k
168− renameBs (PImp _ _ _ _ : ps) (PPi p n ty s)
169+ renameBs (PImp _ _ _ _ _ : ps) (PPi p n ty s)
169 = PPi p (mkImp n) ty (renameBs ps (substMatch n (PRef fc (mkImp n)) s))
170 = PPi p (mkImp n) ty (renameBs ps (substMatch n (PRef fc (mkImp n)) s))
170 renameBs (_:ps) (PPi p n ty s) = PPi p n ty (renameBs ps s)
171 renameBs (_:ps) (PPi p n ty s) = PPi p n ty (renameBs ps s)
171 renameBs _ t = t
172 renameBs _ t = t
@@ -192,7 +193,7 @@ elabRecord info syn fc tyn ty cn cty
193 mkProj recty substs cimp ((pn_in, pty), pos)
194 mkProj recty substs cimp ((pn_in, pty), pos)
194 = do let pn = expandNS syn pn_in
195 = do let pn = expandNS syn pn_in
195− let pfnTy = PTy defaultSyntax fc [] pn
196+ let pfnTy = PTy "" defaultSyntax fc [] pn
196 (PPi expl rec recty
197 (PPi expl rec recty
197 (substMatches substs pty))
198 (substMatches substs pty))
198 let pls = repeat Placeholder
199 let pls = repeat Placeholder
@@ -213,7 +214,7 @@ elabRecord info syn fc tyn ty cn cty
213 let valname = MN 0 "updateval"
214 let valname = MN 0 "updateval"
214 let pt = k (PPi expl pn pty
215 let pt = k (PPi expl pn pty
215 (PPi expl rec recty recty))
216 (PPi expl rec recty recty))
216− let pfnTy = PTy defaultSyntax fc [] setname pt
217+ let pfnTy = PTy "" defaultSyntax fc [] setname pt
217 let pls = map (\x -> PRef fc (MN x "field")) [0..num-1]
218 let pls = map (\x -> PRef fc (MN x "field")) [0..num-1]
218 let lhsArgs = pls
219 let lhsArgs = pls
219 let rhsArgs = take pos pls ++ (PRef fc valname) :
220 let rhsArgs = take pos pls ++ (PRef fc valname) :
@@ -228,8 +229,9 @@ elabRecord info syn fc tyn ty cn cty
228 (map pexp rhsArgs)) []
229 (map pexp rhsArgs)) []
229 return (pn, pfnTy, PClauses fc [] setname [pclause])
230 return (pn, pfnTy, PClauses fc [] setname [pclause])
231−elabCon :: ElabInfo -> SyntaxInfo -> Name -> Bool -> (Name, PTerm, FC) -> Idris (Name, Type)
232+elabCon :: ElabInfo -> SyntaxInfo -> Name -> Bool ->
233+ (String, Name, PTerm, FC) -> Idris (Name, Type)
232−elabCon info syn tn codata (n, t_in, fc)
234+elabCon info syn tn codata (doc, n, t_in, fc)
233 = do checkUndefined fc n
235 = do checkUndefined fc n
234 ctxt <- getContext
236 ctxt <- getContext
@@ -620,10 +622,10 @@ elabClause info tcgen (PWith fc fname lhs_in withs wval_in withblock)
621data MArgTy = IA | EA | CA deriving Show
623data MArgTy = IA | EA | CA deriving Show
623−elabClass :: ElabInfo -> SyntaxInfo ->
625+elabClass :: ElabInfo -> SyntaxInfo -> String ->
624 FC -> [PTerm] ->
626 FC -> [PTerm] ->
625 Name -> [(Name, PTerm)] -> [PDecl] -> Idris ()
627 Name -> [(Name, PTerm)] -> [PDecl] -> Idris ()
626−elabClass info syn fc constraints tn ps ds
628+elabClass info syn doc fc constraints tn ps ds
627 = do let cn = UN ("instance" ++ show tn) -- MN 0 ("instance" ++ show tn)
629 = do let cn = UN ("instance" ++ show tn) -- MN 0 ("instance" ++ show tn)
628 let tty = pibind ps PSet
630 let tty = pibind ps PSet
629 let constraint = PApp fc (PRef fc tn)
631 let constraint = PApp fc (PRef fc tn)
@@ -635,12 +637,14 @@ elabClass info syn fc constraints tn ps ds
635 ims <- mapM (tdecl mnames) mdecls
637 ims <- mapM (tdecl mnames) mdecls
636 defs <- mapM (defdecl (map (\ (x,y,z) -> z) ims) constraint)
638 defs <- mapM (defdecl (map (\ (x,y,z) -> z) ims) constraint)
637 (filter clause ds)
639 (filter clause ds)
638− let (methods, imethods) = unzip (map (\ (x,y,z) -> (x, y)) ims)
640+ let (methods, imethods)
641+ = unzip (map (\ ( x,y,z) -> (x, y)) ims)
639− let cty = impbind ps $ conbind constraints $ pibind methods constraint
642+ let cty = impbind ps $ conbind constraints
643+ $ pibind methods constraint
640− let cons = [(cn, cty, fc)]
644+ let cons = [("", cn, cty, fc)]
641 let ddecl = PDatadecl tn tty cons
645 let ddecl = PDatadecl tn tty cons
642 logLvl 5 $ "Class data " ++ showDImp True ddecl
646 logLvl 5 $ "Class data " ++ showDImp True ddecl
643− elabData info (syn { no_imp = no_imp syn ++ mnames }) fc False ddecl
647+ elabData info (syn { no_imp = no_imp syn ++ mnames }) doc fc False ddecl
644 -- for each constraint, build a top level function to chase it
648 -- for each constraint, build a top level function to chase it
645 logLvl 5 $ "Building functions"
649 logLvl 5 $ "Building functions"
646 let usyn = syn { using = ps ++ using syn }
650 let usyn = syn { using = ps ++ using syn }
@@ -653,9 +657,10 @@ elabClass info syn fc constraints tn ps ds
653 mapM_ (elabDecl EAll info) (concat (map (snd.snd) defs))
657 mapM_ (elabDecl EAll info) (concat (map (snd.snd) defs))
655 let defaults = map (\ (x, (y, z)) -> (x,y)) defs
659 let defaults = map (\ (x, (y, z)) -> (x,y)) defs
656− addClass tn (CI cn imethods defaults (map fst ps) [])
660+ addClass tn (CI cn (map nodoc imethods) defaults (map fst ps) [])
657 addIBC (IBCClass tn)
661 addIBC (IBCClass tn)
663+ nodoc (n, (_, o, t)) = (n, (o, t))
659 pibind [] x = x
664 pibind [] x = x
660 pibind ((n, ty): ns) x = PPi expl n ty (pibind ns x)
665 pibind ((n, ty): ns) x = PPi expl n ty (pibind ns x)
661 impbind [] x = x
666 impbind [] x = x
@@ -663,12 +668,12 @@ elabClass info syn fc constraints tn ps ds
663 conbind (ty : ns) x = PPi constraint (MN 0 "c") ty (conbind ns x)
668 conbind (ty : ns) x = PPi constraint (MN 0 "c") ty (conbind ns x)
664 conbind [] x = x
669 conbind [] x = x
666− getMName (PTy _ _ _ n _) = nsroot n
671+ getMName (PTy _ _ _ _ n _) = nsroot n
667− tdecl allmeths (PTy syn _ o n t)
672+ tdecl allmeths (PTy doc syn _ o n t)
668 = do t' <- implicit' syn allmeths n t
673 = do t' <- implicit' syn allmeths n t
669 logLvl 5 $ "Method " ++ show n ++ " : " ++ showImp True t'
674 logLvl 5 $ "Method " ++ show n ++ " : " ++ showImp True t'
670 return ( (n, (toExp (map fst ps) Exp t')),
675 return ( (n, (toExp (map fst ps) Exp t')),
671− (n, (o, (toExp (map fst ps) Imp t'))),
676+ (n, (doc, o, (toExp (map fst ps) Imp t'))),
672 (n, (syn, o, t) ) )
677 (n, (syn, o, t) ) )
673 tdecl _ _ = fail "Not allowed in a class declaration"
678 tdecl _ _ = fail "Not allowed in a class declaration"
@@ -677,7 +682,7 @@ elabClass info syn fc constraints tn ps ds
677 case lookup n mtys of
682 case lookup n mtys of
678 Just (syn, o, ty) -> do let ty' = insertConstraint c ty
683 Just (syn, o, ty) -> do let ty' = insertConstraint c ty
679 let ds = map (decorateid defaultdec)
684 let ds = map (decorateid defaultdec)
680− [PTy syn fc [] n ty',
685+ [PTy "" syn fc [] n ty',
681 PClauses fc (TCGen:o ++ opts) n cs]
686 PClauses fc (TCGen:o ++ opts) n cs]
682 iLOG (show ds)
687 iLOG (show ds)
683 return (n, ((defaultdec n, ds!!1), ds))
688 return (n, ((defaultdec n, ds!!1), ds))
@@ -687,7 +692,7 @@ elabClass info syn fc constraints tn ps ds
687 defaultdec (UN n) = UN ("default#" ++ n)
692 defaultdec (UN n) = UN ("default#" ++ n)
688 defaultdec (NS n ns) = NS (defaultdec n) ns
693 defaultdec (NS n ns) = NS (defaultdec n) ns
690− tydecl (PTy _ _ _ _ _) = True
695+ tydecl (PTy _ _ _ _ _ _) = True
691 tydecl _ = False
696 tydecl _ = False
692 clause (PClauses _ _ _ _) = True
697 clause (PClauses _ _ _ _) = True
693 clause _ = False
698 clause _ = False
@@ -711,10 +716,10 @@ elabClass info syn fc constraints tn ps ds
711 addInstance False conn' cfn
716 addInstance False conn' cfn
712 addIBC (IBCInstance False conn' cfn)
717 addIBC (IBCInstance False conn' cfn)
713-- iputStrLn ("Added " ++ show (conn, cfn, ty))
718-- iputStrLn ("Added " ++ show (conn, cfn, ty))
714− return [PTy syn fc [] cfn ty,
719+ return [PTy "" syn fc [] cfn ty,
715 PClauses fc [Inlinable,TCGen] cfn [PClause fc cfn lhs [] rhs []]]
720 PClauses fc [Inlinable,TCGen] cfn [PClause fc cfn lhs [] rhs []]]
717− tfun cn c syn all (m, (o, ty))
722+ tfun cn c syn all (m, (doc, o, ty))
718 = do let ty' = insertConstraint c ty
723 = do let ty' = insertConstraint c ty
719 let mnames = take (length all) $ map (\x -> MN x "meth") [0..]
724 let mnames = take (length all) $ map (\x -> MN x "meth") [0..]
720 let capp = PApp fc (PRef fc cn) (map (pexp . PRef fc) mnames)
725 let capp = PApp fc (PRef fc cn) (map (pexp . PRef fc) mnames)
@@ -725,12 +730,12 @@ elabClass info syn fc constraints tn ps ds
725 iLOG (showImp True ty)
730 iLOG (showImp True ty)
726 iLOG (show (m, ty', capp, margs))
731 iLOG (show (m, ty', capp, margs))
727 iLOG (showImp True lhs ++ " = " ++ showImp True rhs)
732 iLOG (showImp True lhs ++ " = " ++ showImp True rhs)
728− return [PTy syn fc o m ty',
733+ return [PTy doc syn fc o m ty',
729 PClauses fc [Inlinable,TCGen] m [PClause fc m lhs [] rhs []]]
734 PClauses fc [Inlinable,TCGen] m [PClause fc m lhs [] rhs []]]
731− getMArgs (PPi (Imp _ _) n ty sc) = IA : getMArgs sc
736+ getMArgs (PPi (Imp _ _ _) n ty sc) = IA : getMArgs sc
732− getMArgs (PPi (Exp _ _) n ty sc) = EA : getMArgs sc
737+ getMArgs (PPi (Exp _ _ _) n ty sc) = EA : getMArgs sc
733− getMArgs (PPi (Constraint _ _) n ty sc) = CA : getMArgs sc
738+ getMArgs (PPi (Constraint _ _ _) n ty sc) = CA : getMArgs sc
734 getMArgs _ = []
739 getMArgs _ = []
736 getMeth (m:ms) (a:as) x | x == a = PRef fc m
741 getMeth (m:ms) (a:as) x | x == a = PRef fc m
@@ -746,14 +751,14 @@ elabClass info syn fc constraints tn ps ds
746 rhsArgs (CA : xs) ns = pconst (PResolveTC fc) : rhsArgs xs ns
751 rhsArgs (CA : xs) ns = pconst (PResolveTC fc) : rhsArgs xs ns
747 rhsArgs [] _ = []
752 rhsArgs [] _ = []
749− insertConstraint c (PPi p@(Imp _ _) n ty sc)
754+ insertConstraint c (PPi p@(Imp _ _ _) n ty sc)
750 = PPi p n ty (insertConstraint c sc)
755 = PPi p n ty (insertConstraint c sc)
751 insertConstraint c sc = PPi constraint (MN 0 "c") c sc
756 insertConstraint c sc = PPi constraint (MN 0 "c") c sc
753 -- make arguments explicit and don't bind class parameters
758 -- make arguments explicit and don't bind class parameters
754− toExp ns e (PPi (Imp l s) n ty sc)
759+ toExp ns e (PPi (Imp l s _) n ty sc)
755 | n `elem` ns = toExp ns e sc
760 | n `elem` ns = toExp ns e sc
756− | otherwise = PPi (e l s) n ty (toExp ns e sc)
761+ | otherwise = PPi (e l s "") n ty (toExp ns e sc)
757 toExp ns e (PPi p n ty sc) = PPi p n ty (toExp ns e sc)
762 toExp ns e (PPi p n ty sc) = PPi p n ty (toExp ns e sc)
758 toExp ns e sc = sc
763 toExp ns e sc = sc
@@ -778,7 +783,7 @@ elabInstance info syn fc cs n ps t expn ds
778 Nothing -> do mapM_ (checkNotOverlapping i t) (class_instances ci)
783 Nothing -> do mapM_ (checkNotOverlapping i t) (class_instances ci)
779 addInstance intInst n iname
784 addInstance intInst n iname
780 Just _ -> addInstance intInst n iname
785 Just _ -> addInstance intInst n iname
781− elabType info syn fc [] iname t
786+ elabType info syn "" fc [] iname t
782 let ips = zip (class_params ci) ps
787 let ips = zip (class_params ci) ps
783 let ns = case n of
788 let ns = case n of
784 NS n ns' -> ns'
789 NS n ns' -> ns'
@@ -836,17 +841,19 @@ elabInstance info syn fc cs n ps t expn ds
836 getRetType (PPi _ _ _ sc) = getRetType sc
841 getRetType (PPi _ _ _ sc) = getRetType sc
837 getRetType t = t
842 getRetType t = t
844+ mkMethApp (n, _, _, ty)
839− mkMethApp (n, _, _, ty) = lamBind 0 ty (papp fc (PRef fc n) (methArgs 0 ty))
845+ = lamBind 0 ty (papp fc (PRef fc n) (methArgs 0 ty))
840− lamBind i (PPi (Constraint _ _) _ _ sc) sc'
846+ lamBind i (PPi (Constraint _ _ _) _ _ sc) sc'
841− = PLam (MN i "meth") Placeholder (lamBind (i+1) sc sc')
847+ = PLam (MN i "meth") Placeholder (lamBind (i+1) sc sc')
848+ lamBind i (PPi _ n ty sc) sc'
842− lamBind i (PPi _ n ty sc) sc' = PLam (MN i "meth") Placeholder (lamBind (i+1) sc sc')
849+ = PLam (MN i "meth") Placeholder (lamBind (i+1) sc sc')
843 lamBind i _ sc = sc
850 lamBind i _ sc = sc
844− methArgs i (PPi (Imp _ _) n ty sc)
851+ methArgs i (PPi (Imp _ _ _) n ty sc)
845− = PImp 0 False n (PRef fc (MN i "meth")) : methArgs (i+1) sc
852+ = PImp 0 False n (PRef fc (MN i "meth")) "" : methArgs (i+1) sc
846− methArgs i (PPi (Exp _ _) n ty sc)
853+ methArgs i (PPi (Exp _ _ _) n ty sc)
847− = PExp 0 False (PRef fc (MN i "meth")) : methArgs (i+1) sc
854+ = PExp 0 False (PRef fc (MN i "meth")) "" : methArgs (i+1) sc
848− methArgs i (PPi (Constraint _ _) n ty sc)
855+ methArgs i (PPi (Constraint _ _ _) n ty sc)
849− = PConstraint 0 False (PResolveTC fc) : methArgs (i+1) sc
856+ = PConstraint 0 False (PResolveTC fc) "" : methArgs (i+1) sc
850 methArgs i _ = []
857 methArgs i _ = []
852 papp fc f [] = f
859 papp fc f [] = f
@@ -865,12 +872,12 @@ elabInstance info syn fc cs n ps t expn ds
865 decorate ns iname (UN n) = NS (UN ('!':n)) ns
872 decorate ns iname (UN n) = NS (UN ('!':n)) ns
866 decorate ns iname (NS (UN n) s) = NS (UN ('!':n)) ns
873 decorate ns iname (NS (UN n) s) = NS (UN ('!':n)) ns
868− mkTyDecl (n, op, t, _) = PTy syn fc op n t
875+ mkTyDecl (n, op, t, _) = PTy "" syn fc op n t
870 conbind (ty : ns) x = PPi constraint (MN 0 "c") ty (conbind ns x)
877 conbind (ty : ns) x = PPi constraint (MN 0 "c") ty (conbind ns x)
871 conbind [] x = x
878 conbind [] x = x
873− coninsert cs (PPi p@(Imp _ _) n t sc) = PPi p n t (coninsert cs sc)
880+ coninsert cs (PPi p@(Imp _ _ _) n t sc) = PPi p n t (coninsert cs sc)
874 coninsert cs sc = conbind cs sc
881 coninsert cs sc = conbind cs sc
876 insertDefaults :: IState -> Name ->
883 insertDefaults :: IState -> Name ->
@@ -903,7 +910,7 @@ elabInstance info syn fc cs n ps t expn ds
903 = decorate ns iname m == decorate ns iname m'
910 = decorate ns iname m == decorate ns iname m'
904 clauseFor m iname ns _ = False
911 clauseFor m iname ns _ = False
906−decorateid decorate (PTy s f o n t) = PTy s f o (decorate n) t
913+decorateid decorate (PTy doc s f o n t) = PTy doc s f o (decorate n) t
907decorateid decorate (PClauses f o n cs)
914decorateid decorate (PClauses f o n cs)
908 = PClauses f o (decorate n) (map dc cs)
915 = PClauses f o (decorate n) (map dc cs)
909 where dc (PClause fc n t as w ds) = PClause fc (decorate n) (dappname t) as w ds
916 where dc (PClause fc n t as w ds) = PClause fc (decorate n) (dappname t) as w ds
@@ -947,17 +954,17 @@ elabDecl' _ info (PFix _ _ _)
947 = return () -- nothing to elaborate
954 = return () -- nothing to elaborate
948elabDecl' _ info (PSyntax _ p)
955elabDecl' _ info (PSyntax _ p)
949 = return () -- nothing to elaborate
956 = return () -- nothing to elaborate
950−elabDecl' what info (PTy s f o n ty)
957+elabDecl' what info (PTy doc s f o n ty)
951 | what /= EDefns
958 | what /= EDefns
952 = do iLOG $ "Elaborating type decl " ++ show n ++ show o
959 = do iLOG $ "Elaborating type decl " ++ show n ++ show o
953− elabType info s f o n ty
960+ elabType info s doc f o n ty
954−elabDecl' what info (PData s f co d)
961+elabDecl' what info (PData doc s f co d)
955 | what /= ETypes
962 | what /= ETypes
956 = do iLOG $ "Elaborating " ++ show (d_name d)
963 = do iLOG $ "Elaborating " ++ show (d_name d)
957− elabData info s f co d
964+ elabData info s doc f co d
958 | otherwise
965 | otherwise
959 = do iLOG $ "Elaborating [type of] " ++ show (d_name d)
966 = do iLOG $ "Elaborating [type of] " ++ show (d_name d)
960− elabData info s f co (PLaterdecl (d_name d) (d_tcon d))
967+ elabData info s doc f co (PLaterdecl (d_name d) (d_tcon d))
961elabDecl' what info d@(PClauses f o n ps)
968elabDecl' what info d@(PClauses f o n ps)
962 | what /= ETypes
969 | what /= ETypes
963 = do iLOG $ "Elaborating clause " ++ show n
970 = do iLOG $ "Elaborating clause " ++ show n
@@ -988,18 +995,18 @@ elabDecl' what info (PNamespace n ps) = mapM_ (elabDecl' what ninfo) ps
988 ninfo = case namespace info of
995 ninfo = case namespace info of
989 Nothing -> info { namespace = Just [n] }
996 Nothing -> info { namespace = Just [n] }
990 Just ns -> info { namespace = Just (n:ns) }
997 Just ns -> info { namespace = Just (n:ns) }
991−elabDecl' what info (PClass s f cs n ps ds)
998+elabDecl' what info (PClass doc s f cs n ps ds)
992 | what /= EDefns
999 | what /= EDefns
993 = do iLOG $ "Elaborating class " ++ show n
1000 = do iLOG $ "Elaborating class " ++ show n
994− elabClass info s f cs n ps ds
1001+ elabClass info s doc f cs n ps ds
995elabDecl' what info (PInstance s f cs n ps t expn ds)
1002elabDecl' what info (PInstance s f cs n ps t expn ds)
996 | what /= ETypes
1003 | what /= ETypes
997 = do iLOG $ "Elaborating instance " ++ show n
1004 = do iLOG $ "Elaborating instance " ++ show n
998 elabInstance info s f cs n ps t expn ds
1005 elabInstance info s f cs n ps t expn ds
999−elabDecl' what info (PRecord s f tyn ty cn cty)
1006+elabDecl' what info (PRecord doc s f tyn ty cdoc cn cty)
1000 | what /= EDefns
1007 | what /= EDefns
1001 = do iLOG $ "Elaborating record " ++ show tyn
1008 = do iLOG $ "Elaborating record " ++ show tyn
1002− elabRecord info s f tyn ty cn cty
1009+ elabRecord info s doc f tyn ty cdoc cn cty
1003elabDecl' _ info (PDSL n dsl)
1010elabDecl' _ info (PDSL n dsl)
1004 = do i <- get
1011 = do i <- get
1005 put (i { idris_dsls = addDef n dsl (idris_dsls i) })
1012 put (i { idris_dsls = addDef n dsl (idris_dsls i) })