blob: 963af55a252e5d6be2682db889c4889c13273c4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
{-# LANGUAGE PartialTypeSignatures, ScopedTypeVariables, NamedWildCards #-}
module Meltdown where
import Control.Applicative
data NukeMonad a b c
instance Functor (NukeMonad a b) where
fmap = undefined
instance Applicative (NukeMonad a b) where
pure = undefined
(<*>) = undefined
instance Monad (NukeMonad a b) where
return = undefined
(>>=) = undefined
isMeltdown :: NukeMonad param1 param2 Bool
isMeltdown = undefined
unlessMeltdown :: _nm () -> _nm ()
unlessMeltdown c = do m <- isMeltdown
if m then return () else c
|