Created
June 4, 2015 15:46
-
-
Save michaelochurch/59dd3d50aba701929fbb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- src/Data/Sum.purs | |
module Data.Sum where | |
import Data.Monoid | |
newtype Sum = Sum {getSum :: Number} | |
instance monoidSum :: Monoid Sum where | |
mempty = Sum 0 | |
(<>) (Sum m) (Sum n) = Sum $ m + n | |
========================================== | |
$ grunt | |
Running "psc:all" (psc) task | |
>> Error creating file dist/Main.js | |
>> | |
Warning: Error at src/Data/Sum.purs line 7, column 1 - line 9, column 36: | |
Error in type class instance Data.Monoid.Monoid Data.Sum.Sum: | |
Error at src/Data/Sum.purs line 9, column 3 - line 9, column 36: | |
Member (<>) has not been implemented | |
See https://github.com/purescript/purescript/wiki/Error-Code-MissingClassMember for more information, or to contribute content related to this error. Use --force to continue. | |
Aborted due to warnings. | |
========================================== | |
It's complaining about (<>) not being implemented, but the location it gives (L9, 3-36) is exactly where I implement it! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment