Created
April 25, 2011 03:02
-
-
Save xrl/940098 to your computer and use it in GitHub Desktop.
Euler.hs Tips and Tricks for Everyday Coding
This file contains 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
one:new_euler xavierlange$ ls prob[1-9] | xargs du | |
17224 prob1 | |
17224 prob2 | |
17240 prob3 | |
17224 prob4 | |
17256 prob5 | |
17224 prob6 | |
one:new_euler xavierlange$ ls prob[1-9] | xargs du -h | |
8.4M prob1 | |
8.4M prob2 | |
8.4M prob3 | |
8.4M prob4 | |
8.4M prob5 | |
8.4M prob6 |
This file contains 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
one:new_euler xavierlange$ otool -L prob10 | |
prob10: | |
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0) | |
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) | |
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) |
This file contains 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
.SUFFIXES: .hs .o | |
SRCS=$(wildcard *.hs) | |
OBJS=$(patsubst %.hs,%.o,${SRCS}) | |
GHC_FLAGS=-O2 --make | |
%.o: %.hs | |
ghc ${GHC_FLAGS} $< | |
.PHONY: all | |
all: ${OBJS} | |
clean: | |
rm -rf *.hi *.o |
This file contains 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
module OtherModule where | |
import SomeName (sampleFunction) | |
-- Now we only have access to sampleFunction -- we know nothing of anotherFunction |
This file contains 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
module SomeName where | |
-- Declare module's functions | |
-- in the preceding lines | |
sampleFunction = reverse | |
anotherFunction = flip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment