Define ListSetOps.getNth, and use it
I was tracking down an error looking like Prelude.(!!): index too large which is very unhelpful. This patch replaces at least some uses of (!!) in GHC with getNth, which has a more helpful error message (with DEBUG anyway)
Showing
- compiler/basicTypes/MkId.lhs 2 additions, 2 deletionscompiler/basicTypes/MkId.lhs
- compiler/coreSyn/CoreLint.lhs 2 additions, 2 deletionscompiler/coreSyn/CoreLint.lhs
- compiler/coreSyn/CoreSubst.lhs 3 additions, 2 deletionscompiler/coreSyn/CoreSubst.lhs
- compiler/deSugar/DsBinds.lhs 2 additions, 1 deletioncompiler/deSugar/DsBinds.lhs
- compiler/deSugar/DsListComp.lhs 3 additions, 2 deletionscompiler/deSugar/DsListComp.lhs
- compiler/typecheck/TcDeriv.lhs 1 addition, 1 deletioncompiler/typecheck/TcDeriv.lhs
- compiler/utils/ListSetOps.lhs 18 additions, 0 deletionscompiler/utils/ListSetOps.lhs
Loading
Please register or sign in to comment