A haplotype method detects diverse scenarios of local adaptation from genomic sequence variation