Better exception for non-exhaustive patterns in case
        Posted  
        
            by toofarsideways
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by toofarsideways
        
        
        
        Published on 2010-04-29T13:25:42Z
        Indexed on 
            2010/04/29
            15:47 UTC
        
        
        Read the original article
        Hit count: 353
        
Is there a way to get GHCi to produce better exception messages when it finds at runtime that a call has produced value that does not match the function's pattern matching?
It currently gives the line numbers of the function which produced the non-exhaustive pattern match which though helpful at times does require a round of debugging which at times I feel is doing the same set of things over and over. So before I tried to put together a solution I wanted to see if something else exists.
An exception message that in addition to giving the line numbers shows what kind of call it attempted to make?
Is this even possible?
© Stack Overflow or respective owner