 
            
            
            
            
                11 Mar
                
                    2016
                
            
            
                11 Mar
                
                '16
                
            
            
            
        
    
                1:18 p.m.
            
        Could you perhaps change every `head` to a pattern match with `[] -> error "impossible, because..."` to see what impossible happened? It could help when some other impossible happens later. Other than that, located-base that Bryan Richter mentioned looks useful too. Best regards, Marcin Mrotek