Ticket #7803: Foo.hs

File Foo.hs, 396 bytes (added by akio, 13 months ago)
Line 
1module Foo (foo1) where
2
3import Prelude
4import Lib
5
6bar :: Floating a => a -> a -> a
7bar z = subtract (evaluate integ z) . evaluate integ
8  where
9    integ = indefinite (Piecewise [Poly4 1])
10{-# SPECIALIZE bar :: Double -> Double -> Double #-}
11
12foo :: Floating a => a -> a -> a
13foo x = bar x
14{-# SPECIALIZE foo :: Double -> Double -> Double #-}
15
16foo1 :: Double -> Double -> Double
17foo1 x = foo x