Skip to content

Instantly share code, notes, and snippets.

@mxswd
Created July 26, 2012 08:43
Show Gist options
  • Select an option

  • Save mxswd/3181033 to your computer and use it in GitHub Desktop.

Select an option

Save mxswd/3181033 to your computer and use it in GitHub Desktop.
import Data.Yaml
import qualified Data.Map as M
main = do
Just f <- decodeFile "programs.yml"
let Just x = M.lookup "SENG" f
case x of
Nothing -> fail "InvalidFile"
Just a -> putStrLn a
---
SENG:
- COMP9001
- COMP8001
- SENG1031
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment