Ignore-this: 3b03abece3edb25c656f84db9cef7734 darcs-hash:20121017171258-76d51-76a4e9057c0a4c3c1370485f3dc072c18caafddf
13 lines
477 B
Haskell
13 lines
477 B
Haskell
{-# LANGUAGE MagicHash #-}
|
|
module Data.Array.Static.Builder where
|
|
|
|
import Data.Static
|
|
|
|
buildStaticArray :: (StaticElement e,Show i) => (i,i) -> [e] -> String
|
|
buildStaticArray (s,e) els = "StaticArray ("++show s++") ("++show e++") \""
|
|
++concat (map (\w -> '\\':show w) (concat (map gen els)))
|
|
++"\"#"
|
|
|
|
buildStaticArray' :: (StaticElement e) => [e] -> String
|
|
buildStaticArray' els = buildStaticArray (0,length els-1) els
|