Last active
August 25, 2020 20:29
-
-
Save MarcelineVQ/c48fd0286d3aa749d9dc4843307bb5a3 to your computer and use it in GitHub Desktop.
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
%foreign "C:worf,libutf8" | |
worf : Char -> Char | |
%foreign "C:worf2,libutf8" | |
worf2 : Int -> Int | |
main : IO () | |
main = do | |
putCharLn 'π' | |
putCharLn (worf 'a') | |
putCharLn (chr (worf2 (ord 'π'))) | |
putCharLn (worf 'π') |
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
char worf(char c) { return c; } | |
int worf2(int c) { return c; } | |
// cc utf.c -shared -o libutf8.so |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment