@@ -1569,7 +1569,8 @@ parseImports fname input
15691569 [ImportInfo],
15701570 Maybe Delta),
15711571 [(FC, OutputAnnotation)], IState)
1572− imports = do whiteSpace
1572+ imports = do optional shebang
1573+ whiteSpace
15731574 (mdoc, mname, annots) <- moduleHeader
15741575 ps_exp <- many import_
15751576 mrk <- mark
@@ -1594,6 +1595,9 @@ parseImports fname input
15941595 (fc, AnnNamespace ns (Just path)) : addPath annots path
15951596 addPath (annot:annots) path = annot : addPath annots path
15961597
1598+ shebang :: IdrisParser ()
1599+ shebang = string "#!" *> many (satisfy $ not . isEol) *> eol *> pure ()
1600+
15971601-- | There should be a better way of doing this...
15981602findFC :: Doc -> (FC, String)
15991603findFC x = let s = show (plain x) in findFC' s