Skip to content

Instantly share code, notes, and snippets.

@natefaubion
Created November 22, 2016 18:11
Show Gist options
  • Select an option

  • Save natefaubion/3996400ce44c1f956c8bc644e9bc2acd to your computer and use it in GitHub Desktop.

Select an option

Save natefaubion/3996400ce44c1f956c8bc644e9bc2acd to your computer and use it in GitHub Desktop.
module Main where
import Prelude
class Thunked a
instance thunkedAll :: Thunked a
type Thunk b = forall a. Thunked a => b
ifThenElse :: forall a. Boolean -> Thunk a -> Thunk a -> a
ifThenElse b l r =
if b then l else r
foo = ifThenElse false 1 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment