Re: [Haskell-beginners] Beginners Digest, Vol 104, Issue 16
[image: Inline image 1] "Problem Opening Wizard" I've Eclipse "Version: Neon.2 Release (4.6.2) Build id: 20161208-0600" installed on macOS El Capitan 10.11.6. "The selected wizard could not be started. Plug-in net.sf.eclipsefp.haskell.ui was unable to load class net.sf.eclipsefp.haskell.ui.wizards.NewHaskellProjectWizard. An error occurred while automatically activating bundle net.sf.eclipsefp.haskell.ui (482)." Albert. Anyone has the same problem and solved it? Thanks. On Thu, Feb 23, 2017 at 1:10 AM, <beginners-request@haskell.org> wrote:
Send Beginners mailing list submissions to beginners@haskell.org
To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-request@haskell.org
You can reach the person managing the list at beginners-owner@haskell.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: Type error when using splitOn function. (Francesco Ariis) 2. Re: Type error when using splitOn function. (S. H. Aegis) 3. How to link two Types (PICCA Frederic-Emmanuel) 4. Re: How to link two Types (David McBride) 5. Re: How to link two Types (PICCA Frederic-Emmanuel) 6. Re: How to link two Types (David McBride)
----------------------------------------------------------------------
Message: 1 Date: Wed, 22 Feb 2017 14:31:16 +0100 From: Francesco Ariis <fa-ml@ariis.it> To: beginners@haskell.org Subject: Re: [Haskell-beginners] Type error when using splitOn function. Message-ID: <20170222133116.GA14860@casa.casa> Content-Type: text/plain; charset=us-ascii
On Wed, Feb 22, 2017 at 09:02:22PM +0900, S. H. Aegis wrote:
Thank you so much.
--makeRxDxList :: Functor f => f Text -> f [Text] Above signature comes from ghci using command :t My intention is makeRxDxList :: Text -> [[Text]] but, I got error, and try several times and below codes pass a complier. makeRxDxList rowRxDx = fmap (\x -> splitOn (pack ",") x) rowRxDx -- This code pass a compile. and then, I run ghci, type :t, and got below signature. makeRxDxList :: Functor f => f Text -> f [Text]
Your kind answer says, I cannot help using fmap. right? ^^; Thanks again.
Then this:
makeRxDxList :: Text -> [[Text]] makeRxDxList rowRxDx = fmap f (lines rowRxDx) -- you imported Prelude hiding map, so we will use fmap where f :: Text -> [Text] f x = splitOn (pack ",") x
should do (at least it typechecks).
GHC errors may not have the prettiest formatting ever, but they are very useful, the most important bits being line & column of the offending expression plus the "expected this but got that" part; get acquainted with them!
------------------------------
Message: 2 Date: Wed, 22 Feb 2017 22:41:10 +0900 From: "S. H. Aegis" <shaegis@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] Type error when using splitOn function. Message-ID: <CAJp-NqxZ5gAqQT8-Swd+PE-ys_PVSAJo1c74+B-UuFabJr_F4w@mail. gmail.com> Content-Type: text/plain; charset="utf-8"
It works !!! (^O^) Thank you so much.
Have a nice day~!
2017-02-22 22:31 GMT+09:00 Francesco Ariis <fa-ml@ariis.it>:
On Wed, Feb 22, 2017 at 09:02:22PM +0900, S. H. Aegis wrote:
Thank you so much.
--makeRxDxList :: Functor f => f Text -> f [Text] Above signature comes from ghci using command :t My intention is makeRxDxList :: Text -> [[Text]] but, I got error, and try several times and below codes pass a complier. makeRxDxList rowRxDx = fmap (\x -> splitOn (pack ",") x) rowRxDx -- This code pass a compile. and then, I run ghci, type :t, and got below signature. makeRxDxList :: Functor f => f Text -> f [Text]
Your kind answer says, I cannot help using fmap. right? ^^; Thanks again.
Then this:
makeRxDxList :: Text -> [[Text]] makeRxDxList rowRxDx = fmap f (lines rowRxDx) -- you imported Prelude hiding map, so we will use fmap where f :: Text -> [Text] f x = splitOn (pack ",") x
should do (at least it typechecks).
GHC errors may not have the prettiest formatting ever, but they are very useful, the most important bits being line & column of the offending expression plus the "expected this but got that" part; get acquainted with them!
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
-- Sok Ha, CHANG Dr. Chang's Clinic. #203. 503-23. AmSa-Dong, GangDong-Gu, Seoul. Tel: +82-2-442-7585
participants (1)
-
tscosj tscosj