Created
          November 6, 2017 04:37 
        
      - 
      
- 
        Save remysucre/0eae2ee40e4abb4c48a2c8b429eb5569 to your computer and use it in GitHub Desktop. 
    srcloc for bangs
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | {-# LANGUAGE BangPatterns #-} | |
| module Main where | |
| import Language.Haskell.Exts | |
| import Language.Haskell.Exts.Syntax | |
| import Data.Generics.Uniplate.DataOnly | |
| main :: IO () | |
| main = do | |
| ParseOk s <- parseFile "/Users/rem/exp/app/Main.hs" | |
| let !locs = [ l | PBangPat l p <- universeBi s] :: [SrcSpanInfo] | |
| print locs | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Nvm you don't need to -1, the first column is exactly where the bang is.