@@ -1569,7 +1569,8 @@ parseImports fname input
1569 [ImportInfo],
1569 [ImportInfo],
1570 Maybe Delta),
1570 Maybe Delta),
1571 [(FC, OutputAnnotation)], IState)
1571 [(FC, OutputAnnotation)], IState)
1572+ imports = do optional shebang
1572− imports = do whiteSpace
1573+ whiteSpace
1573 (mdoc, mname, annots) <- moduleHeader
1574 (mdoc, mname, annots) <- moduleHeader
1574 ps_exp <- many import_
1575 ps_exp <- many import_
1575 mrk <- mark
1576 mrk <- mark
@@ -1594,6 +1595,9 @@ parseImports fname input
1594 (fc, AnnNamespace ns (Just path)) : addPath annots path
1595 (fc, AnnNamespace ns (Just path)) : addPath annots path
1595 addPath (annot:annots) path = annot : addPath annots path
1596 addPath (annot:annots) path = annot : addPath annots path
1598+ shebang :: IdrisParser ()
1599+ shebang = string "#!" *> many (satisfy $ not . isEol) *> eol *> pure ()
1597-- | There should be a better way of doing this...
1601-- | There should be a better way of doing this...
1598findFC :: Doc -> (FC, String)
1602findFC :: Doc -> (FC, String)
1599findFC x = let s = show (plain x) in findFC' s
1603findFC x = let s = show (plain x) in findFC' s