summaryrefslogtreecommitdiff
path: root/compiler/ghci/ByteCodeAsm.lhs
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2013-09-11 18:46:54 -0500
committerAustin Seipp <austin@well-typed.com>2013-09-11 18:47:15 -0500
commitb20cf4ecbf244f091f4084c11ae2350d248ce6ef (patch)
treed595c6c632773bb4110468c23467f0b339096538 /compiler/ghci/ByteCodeAsm.lhs
parent1ef941a82eafb8f22c19e2643685679d2454c24a (diff)
downloadhaskell-b20cf4ecbf244f091f4084c11ae2350d248ce6ef.tar.gz
Fix AMP warnings.
Authored-by: David Luposchainsky <dluposchainsky@gmail.com> Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'compiler/ghci/ByteCodeAsm.lhs')
-rw-r--r--compiler/ghci/ByteCodeAsm.lhs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/ghci/ByteCodeAsm.lhs b/compiler/ghci/ByteCodeAsm.lhs
index e3119a7842..dd8bbe4c83 100644
--- a/compiler/ghci/ByteCodeAsm.lhs
+++ b/compiler/ghci/ByteCodeAsm.lhs
@@ -35,6 +35,7 @@ import Outputable
import Platform
import Util
+import Control.Applicative (Applicative(..))
import Control.Monad
import Control.Monad.ST ( runST )
import Control.Monad.Trans.Class
@@ -223,6 +224,13 @@ data Assembler a
| Emit Word16 [Operand] (Assembler a)
| NullAsm a
+instance Functor Assembler where
+ fmap = liftM
+
+instance Applicative Assembler where
+ pure = return
+ (<*>) = ap
+
instance Monad Assembler where
return = NullAsm
NullAsm x >>= f = f x