Last active
March 5, 2020 19:53
-
-
Save LeifW/25c8113e2b8a11d95ff1a05153db4f14 to your computer and use it in GitHub Desktop.
Purescript UI w/ Flare
This file contains hidden or 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 Effect (Effect) | |
import Flare (UI, string, runFlare) | |
greet :: String -> String | |
greet name = "Hello, " <> name | |
flare :: UI String | |
flare = greet <$> string "Please enter your name:" "Your name" | |
main :: Effect Unit | |
main = runFlare "controls" "output" flare |
This file contains hidden or 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
{ name = "my-project" | |
, dependencies = [ "console", "effect", "flare" ] | |
, packages = ./packages.dhall | |
, sources = [ "src/**/*.purs", "test/**/*.purs" ] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Apparently my code translated into:
Which seems like a pleasantly direct mapping to javascript of the above.