purescript-book icon indicating copy to clipboard operation
purescript-book copied to clipboard

chapter 6.8 in version 12.0

Open elephanter opened this issue 7 years ago • 0 comments

instance streamString :: Stream String Char where
  uncons = String.uncons

Failed to compile with error "Could not match type CodePoint with type Char" I have to replace that code into

instance streamString :: Stream String Char where
    uncons "" =  Nothing
    uncons s = Just {head: charAt 0 s, tail: String.drop 1 s}

to make it work

elephanter avatar Sep 01 '18 09:09 elephanter