Johan Tibell | 13 Nov 18:34 2012
Picon

Where has the special built-in inline function gone?

Hi all,


For the first time, I wanted to use the special built-in inline function. To my dismay, I can't find it anywhere! Here's a minimal example:

--8<---------

module Main where

import GHC.Prim

f x = x + 1
{-# INLINE f #-}

g h x = inline h x

main = print $ g f 1

--8<---------

$ ghc /tmp/Repro.hs 
[1 of 1] Compiling Main             ( /tmp/Repro.hs, /tmp/Repro.o )

/tmp/Repro.hs:8:9:
    Not in scope: `inline'
    Perhaps you meant `unlines' (imported from Prelude)
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.4.1

-- Johan

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Mikhail Glushenkov | 13 Nov 18:42 2012
Picon

Re: Where has the special built-in inline function gone?

Hi Johan,

On Tue, Nov 13, 2012 at 6:34 PM, Johan Tibell <johan.tibell <at> gmail.com> wrote:
> Hi all,
>
> For the first time, I wanted to use the special built-in inline function. To
> my dismay, I can't find it anywhere!

On my system (GHC 7.4.2), it is accessible through GHC.Exts.

--

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
Johan Tibell | 13 Nov 18:56 2012
Picon

Re: Where has the special built-in inline function gone?

Thanks all. I've filed a bug for improving the docs.

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Gmane