Update Read1 NonEmpty and Read1 Down

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Update Read1 NonEmpty and Read1 Down

Dannyu NDos
It would be better if liftReadPrec is used instead of liftReadsPrec.

instance Read1 NonEmpty where
     liftReadPrec rp rl = paren $ prec 5 $ do
          x <- rp
          Symbol ":|" <- lexP
          xs <- rl
          pure (x :| xs)

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries