1 Replies - 6365 Views - Last Post: 07 October 2010 - 10:02 AM

#1 chipmunk5  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 20-February 09

Haskell - splitOneOf function

Posted 05 October 2010 - 09:45 AM

I'm trying to make a call to splitOneOf from Data.List.Split in Hugs, but I keep getting undefined variable functions. Here's my code:

import Data.List 

newfill :: String -> [Line]
newfill x = splitEvery lineLen . split (oneOf ['\n', '\t', ' ']) x




I've tried importing Data.List.Split, but I get the undefined message on it when i do. any thoughts?

Is This A Good Question/Topic? 0
  • +

Replies To: Haskell - splitOneOf function

#2 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Haskell - splitOneOf function

Posted 07 October 2010 - 10:02 AM

View Postchipmunk5, on 05 October 2010 - 03:45 PM, said:

I'm trying to make a call to splitOneOf from Data.List.Split in Hugs, but I keep getting undefined variable functions. Here's my code:

import Data.List 

newfill :: String -> [Line]
newfill x = splitEvery lineLen . split (oneOf ['\n', '\t', ' ']) x




I've tried importing Data.List.Split, but I get the undefined message on it when i do. any thoughts?


There is no 'split' function in Data.List. You can see that here: http://haskell.org/h...e/?hoogle=split

Check out (hoogle) the 'break' function and other similar functions, which I believe are in prelude. They probably do what you want.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1