Last active
December 31, 2019 02:06
-
-
Save ddellacosta/80a05d584f901581a23bc9443426ebb5 to your computer and use it in GitHub Desktop.
deriving newtype instance for UUID fails
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
module Fail where | |
import Data.UUID (UUID) | |
import Simple.JSON as JSON | |
newtype AnId = AnId UUID | |
derive newtype instance readAnId :: JSON.ReadForeign AnId | |
-- error: | |
Compiling Main | |
Error 1 of 2: | |
in module Fail | |
at src/Fail.purs:8:1 - 8:58 (line 8, column 1 - line 8, column 58) | |
No type class instance was found for | |
Simple.JSON.ReadForeign UUID | |
while checking that expression #dict ReadForeign | |
has type { readImpl :: Foreign -> ExceptT (NonEmptyList ForeignError) Identity AnId | |
} | |
in value declaration readAnId | |
See https://github.com/purescript/documentation/blob/master/errors/NoInstanceFound.md for more information, | |
or to contribute content related to this error. | |
-- other error is unrelated module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment