This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class (ctx t) => Free ctx t where | |
type El t :: * | |
foldMap :: ctx a => (El t -> a) -> (t -> a) | |
singleton :: El t -> t | |
map :: (Free ctx t0, Free ctx t1) => (El t0 -> El t1) -> (t0 -> t1) | |
map f = foldMap (singleton . f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vhosts | |
nullable.se | |
serve: FSDirectory | |
directory: /var/www | |
nullable.se.dev | |
serve: FSDirectory | |
directory: /var/www | |
www.nullable.se | |
serve: Redirect | |
http://nullable.se/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bleh: bluh | |
-> | |
bleh | |
bluh | |
, | |
bleh: bluh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Parser | |
import ImaginaryTTXTParser | |
import Data.Map | |
data Serve = Redirect String | FSDirectory String deriving (Show) -- Strings for simplification | |
data ConfigFile = ConfigFile (Map String Serve) deriving (Show) | |
vhosts (ConfigFile vhosts') = vhosts' |