- resources = mkResTree
- [ ([] , helloWorld )
- , (["urandom"], staticFile "/dev/urandom")
- , (["inc" ], staticDir "/usr/include" )
- ]
- fallbacks = [ \ path → case path of
- ["hello"] → return $ Just helloWorld
- _ → return Nothing
+ mapper = resourceMap resources ⊕ resourceMap fallbacks
+ resources ∷ ResourceTree
+ resources = C.fromList
+ [ ([] , nonGreedy helloWorld)
+ , (["urandom" ], nonGreedy $ staticFile "/dev/urandom")
+ , (["inc" ], greedy $ staticDir "/usr/include")
+ , (["inc", "t"], nonGreedy $ staticFile "/usr/include/time.h")