summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T5623.hs
blob: 1936ff78a3bfab530568f4e8c5ab6abb54d02310 (plain)
1
2
3
4
5
6
7
8
9
10
module T5623 where

import Foreign.Storable
import Control.Monad
import GHC.Ptr

foo :: Ptr Float -> IO Float
foo p = liftM2 (+) (peekElemOff q 0) (peekElemOff q 1)
  where
    q = p `plusPtr` 4