Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Fwd: cis194 hw7 question - getting example to work (Dustin Lee)
2. Re: Fwd: cis194 hw7 question - getting example to work
(Carl Eyeinsky)
3. Re: Fwd: cis194 hw7 question - getting example to work
(Dustin Lee)
4. Re: Fwd: cis194 hw7 question - getting example to work
(Brandon Allbery)
5. Re: Fwd: cis194 hw7 question - getting example to work
(Christopher Allen)
6. Re: typeclass woes...how to constain a typeclass to be
"closed" under an operation.... (Nicholls, Mark)
----------------------------------------------------------------------
Message: 1
Date: Mon, 5 Jan 2015 13:28:48 -0700
From: Dustin Lee <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] Fwd: cis194 hw7 question - getting
example to work
Message-ID:
<CAN3sYc05KvwLE3HrZCfSPD9u9XjsFRU8Xn=k1WQF=kky+6r...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
(sorry if dup. I sent first before confirming my subscription)
>From the homework description I've tried running:
dlee@morty ~/repos/cis194/week7 $ runhaskell StringBufEditor.hs
Editor.hs:11:8:
Could not find module `Control.Monad.State'
Perhaps you meant
Control.Monad.ST (from base)
Control.Monad.ST.Safe (from base)
Control.Monad.Fix (from base)
Use -v to see a list of the files searched for.
Is my haskell install messed up? Have the libraries changed since the
homework was created?
Thanks,
dustin
--
Dustin Lee
qhfgva=rot13(dustin)
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20150105/972642ec/attachment-0001.html>
------------------------------
Message: 2
Date: Mon, 5 Jan 2015 23:25:04 +0200
From: Carl Eyeinsky <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Fwd: cis194 hw7 question - getting
example to work
Message-ID:
<cadkv3afmwpmqmasmqg4w+ns_0tcw5e60x7tpj33xvmv3fqy...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hi Dustin,
perhaps you're missing mtl. (There are also C.M.Trans.State in
transformers, though IIRC you have to use lift there to access the methods
in your monad stack.)
On Jan 5, 2015 9:28 PM, "Dustin Lee" <[email protected]> wrote:
> (sorry if dup. I sent first before confirming my subscription)
>
> From the homework description I've tried running:
>
> dlee@morty ~/repos/cis194/week7 $ runhaskell StringBufEditor.hs
>
> Editor.hs:11:8:
> Could not find module `Control.Monad.State'
> Perhaps you meant
> Control.Monad.ST (from base)
> Control.Monad.ST.Safe (from base)
> Control.Monad.Fix (from base)
> Use -v to see a list of the files searched for.
>
> Is my haskell install messed up? Have the libraries changed since the
> homework was created?
>
> Thanks,
>
> dustin
>
> --
> Dustin Lee
> qhfgva=rot13(dustin)
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20150105/15a8b7d6/attachment-0001.html>
------------------------------
Message: 3
Date: Mon, 5 Jan 2015 14:28:01 -0700
From: Dustin Lee <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Fwd: cis194 hw7 question - getting
example to work
Message-ID:
<CAN3sYc2n+bvure7=fOsDkG=6f8zckvdf83_wrjbkpjnvrbw...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Thanks for the reply. What's the simplest path to getting this? I'm not
very familiar with haskell tools, library management. I'm using ubuntu if
that helps
On Mon, Jan 5, 2015 at 2:25 PM, Carl Eyeinsky <[email protected]> wrote:
> Hi Dustin,
>
> perhaps you're missing mtl. (There are also C.M.Trans.State in
> transformers, though IIRC you have to use lift there to access the methods
> in your monad stack.)
> On Jan 5, 2015 9:28 PM, "Dustin Lee" <[email protected]> wrote:
>
>> (sorry if dup. I sent first before confirming my subscription)
>>
>> From the homework description I've tried running:
>>
>> dlee@morty ~/repos/cis194/week7 $ runhaskell StringBufEditor.hs
>>
>> Editor.hs:11:8:
>> Could not find module `Control.Monad.State'
>> Perhaps you meant
>> Control.Monad.ST (from base)
>> Control.Monad.ST.Safe (from base)
>> Control.Monad.Fix (from base)
>> Use -v to see a list of the files searched for.
>>
>> Is my haskell install messed up? Have the libraries changed since the
>> homework was created?
>>
>> Thanks,
>>
>> dustin
>>
>> --
>> Dustin Lee
>> qhfgva=rot13(dustin)
>>
>> _______________________________________________
>> Beginners mailing list
>> [email protected]
>> http://www.haskell.org/mailman/listinfo/beginners
>>
>>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
--
Dustin Lee
qhfgva=rot13(dustin)
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20150105/d2b7d398/attachment-0001.html>
------------------------------
Message: 4
Date: Mon, 5 Jan 2015 16:28:19 -0500
From: Brandon Allbery <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Fwd: cis194 hw7 question - getting
example to work
Message-ID:
<CAKFCL4V3-8WgAYjdMOXnHnjju_8+ny-D9z0ZbbSdNVcdC=x...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
On Mon, Jan 5, 2015 at 3:28 PM, Dustin Lee <[email protected]> wrote:
> Is my haskell install messed up? Have the libraries changed since the
> homework was created?
>
It sounds like you have a minimal ghc installation. Many things were
shifted from ghc's minimal install to the Haskell Platform.
--
brandon s allbery kf8nh sine nomine associates
[email protected] [email protected]
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20150105/b5ed91bf/attachment-0001.html>
------------------------------
Message: 5
Date: Mon, 5 Jan 2015 15:30:59 -0600
From: Christopher Allen <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Fwd: cis194 hw7 question - getting
example to work
Message-ID:
<cadnndoq2yjrny-gos8djhfsux_42joijufkk8g0-ct0370d...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
You can see examples of how to use Cabal and sandboxes to install packages
like mtl in an article I wrote for HowIStart:
http://howistart.org/posts/haskell/1
People are getting steered toward minimal GHC installs on purpose. New
people have to learn how to install packages anyway. You just have to show
them and then they can handle it fine.
--- Chris Allen
On Mon, Jan 5, 2015 at 3:28 PM, Brandon Allbery <[email protected]> wrote:
> On Mon, Jan 5, 2015 at 3:28 PM, Dustin Lee <[email protected]> wrote:
>
>> Is my haskell install messed up? Have the libraries changed since the
>> homework was created?
>>
>
> It sounds like you have a minimal ghc installation. Many things were
> shifted from ghc's minimal install to the Haskell Platform.
>
> --
> brandon s allbery kf8nh sine nomine
> associates
> [email protected]
> [email protected]
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20150105/73508c8e/attachment-0001.html>
------------------------------
Message: 6
Date: Tue, 6 Jan 2015 08:46:24 +0000
From: "Nicholls, Mark" <[email protected]>
To: "The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell" <[email protected]>
Subject: Re: [Haskell-beginners] typeclass woes...how to constain a
typeclass to be "closed" under an operation....
Message-ID: <[email protected]>
Content-Type: text/plain; charset="windows-1252"
I dont seem to have any replies
Booo
Is my question too stupid? Or boring? Or unintelligable?
Its quite common in maths to have operations in a theory that are (set) closed,
i just want to translate that notion to a typeclass
I have a suggestion that does work
Class Foo m where
op :: m a -> m (S a)
That is closed, but now were working on types of kind ? -> ?, which is another
leap of complexity
Is this the idiom/pattern i should follow? Or can the closure contraint be
expressed directly?
Excuse the spelling, sent from a phone with itty bitty keys, it like trying to
sow a button on a shirt with a sausage.
On 5 Jan 2015, at 10:54, Nicholls, Mark
<[email protected]<mailto:[email protected]>> wrote:
> {-# LANGUAGE TypeFamilies, MultiParamTypeClasses, FlexibleContexts,
> FlexibleInstances, GADTs #-}
lets say I have a data type
> data S a = S a deriving Show
and a nice simple typeclass
> class Foo a where
> inc :: a -> S a
make Integer an instance and....
> instance Foo Integer where
> inc x = S x
brilliant...
now lets say I want my typeclass to enforce that any result of inc is also of a
type that is an instance of the typeclass
I'll follow my nose...which causes me a problem that makes me realise I maybe I
don't understand whats going on.
> class Bar a where
> inc' :: (Bar (S a)) => a -> S a
follow it to....
> instance Bar Integer where
> inc' x = S x
this WORKS!...even though "S Integer" is not an instance of Bar!...maybe I
don't understand.
> -- x = inc' (1 :: Integer)
This would go BOOM ....?no instance of (Bar (S Integer))"
...so that makes sense....
How do I force Haskell to check the constraint before I evaluate an expression?
follow my nose?
> -- class (Baz (S a)) => Baz a where
> -- inc'' :: a -> S a
BOOM ...."Cycle in class declaration"....
booo..but I suppose thats understandable....
so
a) is my use of typeclasses correct?...or am I missing something?
b) if so, how do I force the compiler to make sure my typeclass operations is
nicely closed (under the typeclass)?
CONFIDENTIALITY NOTICE
This e-mail (and any attached files) is confidential and protected by copyright
(and other intellectual property rights). If you are not the intended recipient
please e-mail the sender and then delete the email and any attached files
immediately. Any further use or dissemination is prohibited.
While MTV Networks Europe has taken steps to ensure that this email and any
attachments are virus free, it is your responsibility to ensure that this
message and any attachments are virus free and do not affect your systems /
data.
Communicating by email is not 100% secure and carries risks such as delay, data
corruption, non-delivery, wrongful interception and unauthorised amendment. If
you communicate with us by e-mail, you acknowledge and assume these risks, and
you agree to take appropriate measures to minimise these risks when e-mailing
us.
MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon
Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be
Viacom, Viacom International Media Networks and VIMN and Comedy Central are all
trading names of MTV Networks Europe. MTV Networks Europe is a partnership
between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for
service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT.
_______________________________________________
Beginners mailing list
[email protected]<mailto:[email protected]>
http://www.haskell.org/mailman/listinfo/beginners
CONFIDENTIALITY NOTICE
This e-mail (and any attached files) is confidential and protected by copyright
(and other intellectual property rights). If you are not the intended recipient
please e-mail the sender and then delete the email and any attached files
immediately. Any further use or dissemination is prohibited.
While MTV Networks Europe has taken steps to ensure that this email and any
attachments are virus free, it is your responsibility to ensure that this
message and any attachments are virus free and do not affect your systems /
data.
Communicating by email is not 100% secure and carries risks such as delay, data
corruption, non-delivery, wrongful interception and unauthorised amendment. If
you communicate with us by e-mail, you acknowledge and assume these risks, and
you agree to take appropriate measures to minimise these risks when e-mailing
us.
MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon
Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be
Viacom, Viacom International Media Networks and VIMN and Comedy Central are all
trading names of MTV Networks Europe. MTV Networks Europe is a partnership
between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for
service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20150106/d66027c3/attachment.html>
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 79, Issue 7
****************************************