Skip to content
Snippets Groups Projects
Commit 18903017 authored by Hans-Peter Deifel's avatar Hans-Peter Deifel
Browse files

Add comment about Any usage to SomeFunctor

parent cbd95b1d
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,15 @@ someFunctor ::
someFunctor fd =
fd { functorExprParser = transParser SomeFunctor (functorExprParser fd )}
-- A note on all this Any stuff:
--
-- It's safe to unsafeCoerce a type to Any and than coerce it back, but what we
-- do here is actually "unsafeCoerce :: [Any] -> [Label]" instead of the more
-- obviously safe "map (unsafeCoerce :: Any -> Label)". According to #haskell,
-- it's "about as safe".
#ifdef RELEASE
newtype SomeLabel = SomeLabel Any
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment