How to compile a resource into a binary in Haskell?

后端 未结 4 1850
小蘑菇
小蘑菇 2020-12-29 04:12

Say I have a dictionary.txt file, I need to read it into a map and use it in my program, how can I make this dictionary.txt file contained in the compiled exe f

4条回答
  •  不知归路
    2020-12-29 04:57

    You'll have to come up with your own way to get it into a Map, but http://hackage.haskell.org/package/file-embed will get it into your compiled binary. We use it for embedding templates in some of our web applications.

提交回复
热议问题