Difference between revisions of "User:JRV"

From HaskellWiki
Jump to navigation Jump to search
(Added special characters!)
(Got rid of draft tutorial)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Testing MediaWiki markup==
 
 
I'm new at this, and I thought I'd use this page to test some things I want to use in
 
a Wiki article.
 
 
First, can I can compose offline with MacVim
 
and paste into my user page. The answer to this is yes.
 
 
== Some Haskell code==
 
 
Following is produced using <pre><haskell>...</haskell></pre> gets haskell highlighting.
 
How do I get highlighting for, say, C?
 
 
 
<haskell>
 
{-# LANGUAGE ForeignFunctionInterface #-}
 
 
module Safe where
 
 
import Foreign.C.Types
 
 
fibonacci :: Int -> Int
 
fibonacci n = fibs !! n
 
where fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
 
 
fibonacci_hs :: CInt -> CInt
 
fibonacci_hs = fromIntegral . fibonacci . fromIntegral
 
 
foreign export ccall fibonacci_hs :: CInt -> CInt
 
 
</haskell>
 
 
== Some misc text ==
 
 
Here is some ''italic'' text.
 
 
== Special symbols ==
 
 
Well, I should be able to do this in vim, I'll try later
 
when I have time.
 
 
It's not vim, but here is the OS X Character pallet:
 
 
em dash: —
 
 
“ quotation marks ”
 
 
==Links to other pages==
 
The place that got me started toward this is [[Calling_Haskell_from_C| Calling Haskell from C]].
 

Latest revision as of 16:22, 2 November 2009