Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haskell: Could not find module `Data.List.Split'

Tags:

haskell

I'm trying to split a list in Haskell. As to my knowledge, the easiest way to do this is with splitOn, but this function requires Data.List.Split, so I tried to run import Data.List.Split in Prelude. However, I got the following error:

Could not find module Data.List.Split

Simply importing Data.List does work, however.

What could I do to solve this? Or, even better: is there an easy, built-in alternative to split lists?

like image 977
TheLeonKing Avatar asked Dec 09 '15 09:12

TheLeonKing


1 Answers

Data.List.Split is not in the base I think you'll have to install split

Update

after the clarification in the comments that only splitting on whitespace is required - use words/lines to your need - see also @Zeta's answer.

like image 196
epsilonhalbe Avatar answered Oct 19 '22 03:10

epsilonhalbe