Skip to content

Instantly share code, notes, and snippets.

@chrisdone
Last active January 20, 2019 22:51
Show Gist options
  • Select an option

  • Save chrisdone/799851caf1564c4dd8a763936e250f70 to your computer and use it in GitHub Desktop.

Select an option

Save chrisdone/799851caf1564c4dd8a763936e250f70 to your computer and use it in GitHub Desktop.
Prana output example
fix :: (a -> a) -> a
fix f = let x = f x in x
on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
(.*.) `on` f = \x y -> f x .*. f y
(&) :: a -> (a -> b) -> b
x & f = f x
--- 332 bytes of flat memory
Prelude S> fmap S.unpack $ S.readFile "/root/ghc_build/ghc-8.0/libraries/base/base_Data.Function.prana"
[4,0,0,0,0,0,0,0,0,254,6,0,0,0,0,0,0,3,1,213,56,0,0,0,0,0,0,3,0,214,56,0,0,0,0,0,0,4,1,1,0,0,0,0
,0,0,0,215,56,0,0,0,0,0,0,2,0,214,56,0,0,0,0,0,0,0,215,56,0,0,0,0,0,0,0,215,56,0,0,0,0,0,0,0,255
,6,0,0,0,0,0,0,3,1,216,56,0,0,0,0,0,0,3,1,217,56,0,0,0,0,0,0,3,1,218,56,0,0,0,0,0,0,3,0,219,56,0
,0,0,0,0,0,3,0,220,56,0,0,0,0,0,0,3,0,221,56,0,0,0,0,0,0,3,0,222,56,0,0,0,0,0,0,2,2,0,219,56,0,0
,0,0,0,0,2,0,220,56,0,0,0,0,0,0,0,221,56,0,0,0,0,0,0,2,0,220,56,0,0,0,0,0,0,0,222,56,0,0,0,0,0,0
,0,0,7,0,0,0,0,0,0,3,1,223,56,0,0,0,0,0,0,3,1,224,56,0,0,0,0,0,0,3,0,225,56,0,0,0,0,0,0,3,0,226,56
,0,0,0,0,0,0,2,0,226,56,0,0,0,0,0,0,0,225,56,0,0,0,0,0,0,0,1,7,0,0,0,0,0,0,2,2,10,2,10,1,1,4,0,0
,0,0,0,0,0,98,97,115,101,2,10,1,1,13,0,0,0,0,0,0,0,68,97,116,97,46,70,117,110,99,116,105,111,110
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment