This is a brief and bare-bones guide to getting GHC 7.2 and the cabal-install
tool (the two basic things you'll need to do Haskell development) up and running
on a new Mac OS X 10.7 install.
The instructions given here worked for me, but YMMV.
{-# LANGUAGE OverloadedStrings #-} | |
import Lengthable | |
import Prelude hiding (length) | |
import qualified Data.Text | |
import Data.Text(Text(..)) | |
text :: Text | |
text = "abcdefg" | |
main = do print $ length [1,2,3] |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Helpers for automating the process of setting up ported Linux/UNIX | |
applications which were designed with expectations like being in $PATH. | |
@note: Basic functionality requires only the Python standard library. | |
Some functions and methods also require the PyWin32 package. | |
@note: A much more verbose "sudo for Windows" implementation (BSD-licensed) |
package com.tomgibara.android.util; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.EnumSet; | |
import android.os.AsyncTask; | |
import android.os.SystemClock; | |
import com.google.android.apps.analytics.GoogleAnalyticsTracker; |
/** | |
* Part Zero : 10:15 Saturday Night | |
* | |
* (In which we will see how to let the type system help you handle failure)... | |
* | |
* First let's define a domain. (All the following requires scala 2.9.x and scalaz 6.0) | |
*/ | |
import scalaz._ | |
import Scalaz._ |
(* Borrowed very liberally from | |
https://blogs.msdn.com/b/jomo_fisher/archive/2010/03/06/neat-samples-f-freebase-and-dgml.aspx | |
and | |
http://cs.hubfs.net/forums/permalink/11096/11096/ShowThread.aspx#11096 | |
Many thanks to both those posters for giving me 99% of the starting code |
(* | |
to compile use: | |
fsc FebKit.fs -r "/usr/lib/cli/webkit-sharp-1.0/webkit-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll" | |
*) | |
#light | |
open System | |
open WebKit | |
open Gtk |