removed all uses of undefined from code base
It's a code smell, can lead to hard to diagnose error messages.
This commit is contained in:
parent
d7f4c823d7
commit
addc82dab7
19 changed files with 42 additions and 37 deletions
|
@ -72,7 +72,7 @@ chunkKeyStream basek chunksize = ChunkKeyStream $ map mk [1..]
|
|||
|
||||
nextChunkKeyStream :: ChunkKeyStream -> (Key, ChunkKeyStream)
|
||||
nextChunkKeyStream (ChunkKeyStream (k:l)) = (k, ChunkKeyStream l)
|
||||
nextChunkKeyStream (ChunkKeyStream []) = undefined -- stream is infinite!
|
||||
nextChunkKeyStream (ChunkKeyStream []) = error "expected infinite ChunkKeyStream"
|
||||
|
||||
takeChunkKeyStream :: ChunkCount -> ChunkKeyStream -> [Key]
|
||||
takeChunkKeyStream n (ChunkKeyStream l) = genericTake n l
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue