Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manpages/get-lambda
https://github.com/manpages/get-lambda
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/manpages/get-lambda
- Owner: manpages
- Created: 2014-01-03T23:21:01.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-04T00:01:19.000Z (almost 11 years ago)
- Last Synced: 2023-03-12T06:04:25.443Z (over 1 year ago)
- Size: 113 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
On the table you see a greek alphabet.
\> get lambda
###Get Lambda
Get Lambda is a framework for writing Interactive Fiction in Haskell.
It aims to provide
+ a good decoupled way of writing IF
+ text-based intermediate protocol for more representation freedom
+ means to implement complex logic in a clean fashion
+ and some more stuffThe engine concept can be described with this listing:
```
module Engine
( Object,
Trait,
Relation,
Action,
) whereimport Data.Map (Map)
import qualified Data.Map as Map
import Data.Set (Set)
import qualified Data.Set as Set-- This module exports kinds, traits, relations, actions definitions
type Key = String
data Value = String | Number | Action
type KV = Map.Map Key Value
type Action = ([String] -> KV) -> KVdata Object = Object { id :: String, kind :: String, traits :: Set.Set Trait, state :: KV }
data Trait = Trait { trait :: String, actions :: Map.Map String Action }data Relation a b = Relation { relation :: String, graph :: [(a -> b) -> Bool] }
```