Created
September 5, 2019 09:04
-
-
Save minoki/844ba88fc49afdf38bb56af8c52dd501 to your computer and use it in GitHub Desktop.
短絡評価の有無で停止するか否かが変わる例
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 Data.HeytingAlgebra | |
import Effect (Effect) | |
import Effect.Console (log) | |
foo :: forall a. HeytingAlgebra a => Unit -> a | |
foo x = foo x | |
bar :: Unit -> Boolean | |
bar _ = tt || foo unit | |
baz :: forall a. HeytingAlgebra a => Unit -> a | |
baz _ = tt || foo unit | |
main :: Effect Unit | |
main = do | |
log (show (bar unit :: Boolean)) | |
log (show (baz unit :: Boolean)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment