reader_ x | res:_ <- catMaybes
    [f "INT" (0::Integer), f "NUM" (0::Float), f "NUM" (0::Double)
    ,f "INT" (0::Int), f "INT" (0::Int8), f "INT" (0::Int16), f "INT" (0::Int32), f "INT" (0::Int64)
    ,f "NAT" (0::Word), f "NAT" (0::Word8), f "NAT" (0::Word16), f "NAT" (0::Word32), f "NAT" (0::Word64)
    ] = Just res
    where
        ty = typeOf x
        f hlp t | typeOf (Any t) /= ty = Nothing
                | otherwise = Just $ Reader hlp False 1 id $ const $ \s -> case reads s of
            [(x,"")] -> Right $ Any $ x `asTypeOf` t
            _ -> Left $ "Could not read as type " ++ show (typeOf $ Any t) ++ ", " ++ show s
reader_ x | res:_ <- catMaybes
    [f "INT" (0::Integer), f "NUM" (0::Float), f "NUM" (0::Double)
    ,f "INT" (0::Int), f "INT" (0::Int8), f "INT" (0::Int16), f "INT" (0::Int32), f "INT" (0::Int64)
    ,f "NAT" (0::Word), f "NAT" (0::Word8), f "NAT" (0::Word16), f "NAT" (0::Word32), f "NAT" (0::Word64)
    ] = Just res
    where
        ty = typeOf x
        f hlp t | typeOf (Any t) /= ty = Nothing
                | otherwise = Just $ Reader hlp False 1 id $ const $ \s -> case reads s of
            [(x,"")] -> Right $ Any $ x `asTypeOf` t
            _ -> Left $ "Could not read as type " ++ show (typeOf $ Any t) ++ ", " ++ show s
reader_ x | res:_ <- catMaybes
    [f "INT" (0::Integer), f "NUM" (0::Float), f "NUM" (0::Double)
    ,f "INT" (0::Int), f "INT" (0::Int8), f "INT" (0::Int16), f "INT" (0::Int32), f "INT" (0::Int64)
    ,f "NAT" (0::Word), f "NAT" (0::Word8), f "NAT" (0::Word16), f "NAT" (0::Word32), f "NAT" (0::Word64)
    ] = Just res
    where
        ty = typeOf x
        f hlp t | typeOf (Any t) /= ty = Nothing
                | otherwise = Just $ Reader hlp False 1 id $ const $ \s -> case reads s of
            [(x,"")] -> Right $ Any $ x `asTypeOf` t
            _ -> Left $ "Could not read as type " ++ show (typeOf $ Any t) ++ ", " ++ show s