This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data NXFile = NXFile | |
{ getNodeCount :: Int | |
, getNodeBlock :: Ptr () | |
, getStringCount :: Int | |
, getStringBlock :: Ptr () | |
, getBitmapCount :: Int | |
, getBitmapBlock :: Ptr () | |
, getAudioCount :: Int | |
, getAudioBlock :: Ptr () | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings, BangPatterns #-} | |
module Main (main) where | |
import Control.Applicative | |
import Control.Monad | |
import qualified Data.ByteString as BS | |
import qualified Data.Vector as V | |
import Data.Word | |
import Data.Maybe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings, BangPatterns #-} | |
module Main (main) where | |
import Control.Applicative | |
import Control.Monad | |
import Control.Monad.Loops | |
import qualified Data.ByteString as BS | |
import Data.Word | |
import System.IO.MMap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
searchBench :: NXFile -> BS.ByteString -> NXNode -> IO () | |
searchBench han str nod = do | |
(Just node) <- nxLookup han str | |
let name1 = getName node | |
info = getFileInfo han | |
fch = getFirstChildID node | |
cch = getChildrenCount node | |
cond = (>= fch + cch) | |
act x = do | |
node2 <- nxNodeFromID info x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Todo: Improve laziness | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
import Control.Monad.State | |
import Control.Monad.Identity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE BangPatterns #-} | |
----------------------------------------------------------------------------- | |
-- | | |
-- Module : Control.Monad.Chrono |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kyle@kyle-laptop /c/Users/Kyle/Desktop$ ghc -fllvm -fforce-recomp test.hs | |
[1 of 1] Compiling Main ( test.hs, test.o ) | |
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s: Assembler messages: | |
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:2: Error: junk at end of line, first unrecognized character is `,' | |
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:3: Warning: .type pseudo-op used outside of .def/.endef ignored. | |
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:3: Error: junk at end of line, first unrecognized character is `s' | |
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:7: Warning: .size pseudo-op used outside of .def/.endef ignored. | |
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:7: Error: junk at end of line, first unrecognized character is `s' | |
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:10: Warning: .type pseudo-op used outside of .def/.endef ignored. | |
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:10: Error: junk at end of line, firs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE Trustworthy #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
-------------------------------------------------------------------------------- | |
-- | | |
-- Module : Burrito.Serialize | |
-- Copyright : (C) Burrito Development Team, 2013. All rights reserved. | |
-- License : MIT | |
-- | |
-- Maintainer : Kyle Van Berendonck <[email protected]> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case x8 of { | |
True# | |
-> singleton [r1] [Nat r2] n; | |
False# | |
-> let x9 : Nat r2 = N# [r2] 1# in | |
let x10 : Nat r2 = addNat [r2] [r2] [r2] n x9 in | |
let x11 : List r1 (Nat r2) = enumFromTo [r1] [r2] x10 max in | |
Cons [r1] [Nat r2] n x11 | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>fileTypes</key> | |
<array> | |
<string>hs</string> | |
</array> | |
<key>keyEquivalent</key> | |
<string>^~H</string> |