Created
July 22, 2016 16:36
-
-
Save kika/54a8ac517065eba29cc224254bdf5603 to your computer and use it in GitHub Desktop.
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 Main where | |
import Prelude | |
import Control.Monad.Eff | |
import Control.Monad.Eff.Console | |
type Config = { | |
debug::Boolean | |
} | |
type Params = { | |
config::Config | |
} | |
printParams::forall e.Params -> Eff (console::CONSOLE|e) Unit | |
printParams p = | |
log $ show p.config.debug | |
updateParams::Params -> Boolean -> Params | |
updateParams p debug = | |
p { config = p.config { debug }} | |
main = do | |
printParams $ updateParams {config: {debug: true}} false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment