Skip to content

GIML/gimlh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gimlh

Haskell parser for GIML.

Sponsored by Evil Martians

Install

cabal install gimlh

Usage

import Gimlh

getGiml :: FilePath -> IO SimpleGiml
getGiml path = do
  giml <- parseFile path
  let simplified = simplifyGiml giml
  return simplifyGiml

Documentation

haddock

There are three methods: parseString, parseFile and simplifyGiml

parseString will parse GIML from pure string.

parseFile accepts FilePath and parses it into IO Giml

simplifyGiml translates parsed GIML in simply form SimplyGiml

fetch fetch values from simplified giml by given key

fetchG fetch values from giml by given key

val2Str retruns values stored in GIML in string representation

val2List retruns values stored in GIML in list of string representation

Giml - is a type which contains list of GimlNodes

SimplyGiml - is a list of tuples (String, GimlVal) == (key, value)

GimlNode - is a tuple (String, GimlType, GimlVal)

GimlVal - can be one of four types: Text String | List [String] | Number Integer | Float Double

GimlType - types for GimlVal stored in GimlNode. Can be TextG | ListG | NumberG | FloatG

Releases

No releases published

Packages

No packages published