Skip to content

Commit

Permalink
fix(Action): fix there are multiple module_info functions
Browse files Browse the repository at this point in the history
  • Loading branch information
EMQ-YangM authored and emqplus committed Jun 24, 2020
1 parent 9e58be7 commit 6b68a28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Language/Hamler/Make/Actions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,5 @@ buildMakeActions isInline outputDir filePathMap foreigns _ =
splitErlangCore :: T.Text -> (T.Text,T.Text)
splitErlangCore f =
let (a,b) = L.span (\c -> T.head c /= '\'') $ T.lines f
in (T.unlines a , T.unlines $ take (length b - 9) b <> ["end"])
(c,_) = L.span ( /= "\'module_info\'/0 =" ) b
in (T.unlines a , T.unlines $ c <> ["end"])

0 comments on commit 6b68a28

Please sign in to comment.