comparison src/cjr_print.sml @ 1869:16b08de04f05

Detect more SQL uses without 'database' directive
author Adam Chlipala <adam@chlipala.net>
date Mon, 30 Sep 2013 16:37:37 -0400
parents e6ff36097cc4
children 0354df1b6849
comparison
equal deleted inserted replaced
1868:d6b0ee53dc93 1869:16b08de04f05
3182 fun declDb (d, _) = 3182 fun declDb (d, _) =
3183 case d of 3183 case d of
3184 DVal (_, _, _, e) => expDb e 3184 DVal (_, _, _, e) => expDb e
3185 | DFun (_, _, _, _, e) => expDb e 3185 | DFun (_, _, _, _, e) => expDb e
3186 | DFunRec vis => List.exists (expDb o #5) vis 3186 | DFunRec vis => List.exists (expDb o #5) vis
3187 | DTask (_, _, _, e) => expDb e
3187 | _ => false 3188 | _ => false
3188 3189
3189 val () = if not hasDb andalso List.exists declDb ds then 3190 val () = if not hasDb andalso List.exists declDb ds then
3190 ErrorMsg.error "Application uses a database but has none configured with 'database' in .urp file." 3191 ErrorMsg.error "Application uses a database but has none configured with 'database' in .urp file."
3191 else 3192 else