Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Int' is not identical to 'Int8' #66

Closed
mpurland opened this issue Jul 10, 2014 · 1 comment
Closed

'Int' is not identical to 'Int8' #66

mpurland opened this issue Jul 10, 2014 · 1 comment

Comments

@mpurland
Copy link
Member

Code example shows (but does not compile due to error):

        let xs = [1, 2, 0, 3, 4]

        // we can use the Min semigroup to find the minimal element in xs
        sconcat(Min(), 2, xs) // 0

        // we can use the Sum monoid to find the sum of xs
        mconcat(Sum<Int8, NInt8>(i: { return nint8 }), xs) // 10    

but in order to compile with Xcode 6 beta 3 xs must be array of Int8.
Compiles:

        let xs: [Int8] = [1, 2, 0, 3, 4]

        // we can use the Min semigroup to find the minimal element in xs
        sconcat(Min(), 2, xs) // 0

        // we can use the Sum monoid to find the sum of xs
        mconcat(Sum<Int8, NInt8>(i: { return nint8 }), xs) // 10        
@mxswd
Copy link
Contributor

mxswd commented Jul 14, 2014

Thanks for finding that! Fixed in ed51ecc

@mxswd mxswd closed this as completed Jul 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants