16 lines
No EOL
499 B
Haskell
16 lines
No EOL
499 B
Haskell
module RPGEngine.Parse
|
|
( parse
|
|
) where
|
|
|
|
import RPGEngine.Data ( Game )
|
|
import RPGEngine.Parse.StructureToGame ( structureToGame )
|
|
import GHC.IO (unsafePerformIO)
|
|
import Text.Parsec.String (parseFromFile)
|
|
import RPGEngine.Parse.TextToStructure ( gameFile )
|
|
|
|
------------------------------ Exported ------------------------------
|
|
|
|
parse :: FilePath -> Game
|
|
parse filename = structureToGame struct
|
|
where (Right struct) = unsafePerformIO io
|
|
io = parseFromFile gameFile filename |