Skip to content

Instantly share code, notes, and snippets.

@sras
Created January 3, 2020 05:51
Show Gist options
  • Save sras/345b4e16102bbfe95a3a707507370b6f to your computer and use it in GitHub Desktop.
Save sras/345b4e16102bbfe95a3a707507370b6f to your computer and use it in GitHub Desktop.
data Test where
Test :: (forall a. (Typeable a) => a -> ()) -> Test
callTest :: Test -> ()
callTest (Test fn) = case cast 'c' of <-- Error here
Just b -> fn b
|| • No instance for (Typeable a0) arising from a use of ‘cast’
|| • In the expression: cast 'c'
|| In the expression: case cast 'c' of { Just b -> fn b }
|| In an equation for ‘callTest’:
|| callTest (Test fn) = case cast 'c' of { Just b -> fn b }
|| |
|| 210 | callTest (Test fn) = case cast 'c' of
|| | ^^^^^^^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment