on master help sign in
Make names accessible before building case split

Otherwise the typechecker won't be able to get at the definition we're building

commit5232002e85f037a83bd5afce014414a367a94c19 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateSun 23 Mar 2014, 12:57 (13 years ago) parent7af5df9
1 file changed+2
src/Idris/CaseSplit.hs+2
src/Idris/CaseSplit.hs+2
@@ -51,6 +51,8 @@ names over '_', patterns over names, etc.
5151split :: Name -> PTerm -> Idris [[(Name, PTerm)]]
5252split n t'
5353 = do ist <- getIState
54+ -- Make sure all the names in the term are accessible
55+ mapM_ (\n -> setAccessibility n Public) (allNamesIn t')
5456 (tm, ty, pats) <- elabValBind toplevel True (addImplPat ist t')
5557 logLvl 4 ("Elaborated:\n" ++ show tm ++ " : " ++ show ty ++ "\n" ++ show pats)
5658-- iputStrLn (show (delab ist tm) ++ " : " ++ show (delab ist ty))