Skip to content

Instantly share code, notes, and snippets.

View ahammar's full-sized avatar

Andreas Hammar ahammar

View GitHub Profile
@ahammar
ahammar / Array.hs
Created February 14, 2014 08:48
Mutually recursive modules using a .hs-boot file
module Array where
import qualified Data.IntMap as M
import {-# SOURCE #-} Object
data Array = Array
{ _map :: M.IntMap Value
}
a ! i {- | i >= baseLength ai -} = maybe vnil id $ M.lookup i (_map a)