Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Dead dogs data types

Name: Anonymous 2009-05-02 3:53

I'm writing a simulation and I have to define a data type for a process. The data type includes a process name and execution time. What would be the consequences of using a synonym for [m]([Char], Int)[m] rather a new data type (data Proc = Proc [Char] Int)
?

Name: Anonymous 2009-05-02 4:05

A new data type is distinct from (Char,Int) so it won't inherit any type class instances, such as Functor ((,) a).

But more importantly, if you're likely to be using ([Char], Int) to mean something different elsewhere, and they could be confused, then you should probably distinguish them with data or newtype.

Name: Anonymous 2009-05-02 5:51

dead dogs

Name: Anonymous 2009-05-02 7:22

>>3
Hoow did you doo that backwards b?

Name: Anonymous 2009-05-02 7:23

>>4
It's called d.

Name: Anonymous 2009-05-02 7:23

>>2
DONET HELP HIM

Name: Anonymous 2009-05-02 7:53

>>4
ITZ FUNNI BECOZ HE NEEDZ D 2 SPL BACKWARDS LOLOLOLOOLLOLOL!!!!!!onehundredandeleven!!!!1!

Name: Anonymous 2009-05-02 8:12

>>6
Too late, I'm already grateful.

Name: Anonymous 2009-05-02 8:55

db
qp

Name: Anonymous 2009-05-02 11:29

THE GAME

Name: Anonymous 2009-05-02 11:35

>>10
THE GAME
Back to /b/, please.

Don't change these.
Name: Email:
Entire Thread Thread List