The problem is that if I run the function loadPlugin on the same input more than once, GHC barfs. The error I get is:
/usr/bin/ld.gold: error: cannot find -lghc_5
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
*** Exception: ExitFailure 1
sometimes it's -lghc_2 or -lghc_13 above. Anyways, it seems like I and/or ghc isn't cleaning up properly after themself and then wants to try to append numbers. Any idea what is causing this and how to fix it?
PS. is there a better way of doing this using Typeable? I'd rather not unsafeCoerce.