on master help sign in
Allow postulates in where/parameters blocks
commit430eab9b6d6d3cad862598b8c7ed3741da1ef980 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateMon 26 Nov 2012, 21:21 (14 years ago) parentb1cdd04
1 file changed+7
src/Idris/AbsSyntax.hs+7
src/Idris/AbsSyntax.hs+7
@@ -511,6 +511,13 @@ expandParamsD rhsonly ist dec ps ns (PTy doc syn fc o n ty)
511511 PTy doc syn fc o (dec n) (piBind ps (expandParams dec ps ns ty))
512512 else --trace (show (n, expandParams dec ps ns ty)) $
513513 PTy doc syn fc o n (expandParams dec ps ns ty)
514+expandParamsD rhsonly ist dec ps ns (PPostulate doc syn fc o n ty)
515+ = if n `elem` ns && (not rhsonly)
516+ then -- trace (show (n, expandParams dec ps ns ty)) $
517+ PPostulate doc syn fc o (dec n) (piBind ps
518+ (expandParams dec ps ns ty))
519+ else --trace (show (n, expandParams dec ps ns ty)) $
520+ PPostulate doc syn fc o n (expandParams dec ps ns ty)
514521expandParamsD rhsonly ist dec ps ns (PClauses fc opts n cs)
515522 = let n' = if n `elem` ns then dec n else n in
516523 PClauses fc opts n' (map expandParamsC cs)