* with practically every modern IDE (say, Eclipse for Java), indentation is a
non-issue.
How so? In future IDEs, source code might just be a view on an internal
representation, but we've have that kind of IDE in the past, and some users
developed a definite dislike to tools that wouldn't let
As far as referential transparency is concerned, you'd need to keep
your reference levels straight, which can seem confusing if you can
only communicate via representations(*:-)
That came out more confusing than it needs to be, so let me try that
again, from scratch:
Reduction systems take
Let's turn this around. You invest 4 months of your life coming out
with your own experimental Haskell compiler designed to easily test
new language features. Then a bunch of ungrateful wretches on Haskell
Cafe demand that you stop distributing your compiler until you have
full support for
*Main :t rollDie ~ (rollDie ~ rollDie)
rollDie ~ (rollDie ~ rollDie) :: Seed - (Int, Seed)
This is a function. How exactly do you want ghci to show it? When you
figure that out, feel free to make an instance of Show for it.
Just because user programs can't show function internals (they can
Well, than, what would you expect from this:
let {f x = g x;
g 0 = 0;
g n = f (n-1)}
in show f
Well, not show, because any show instance for functions breaks r.t. But the
interactive interpreter, if it is not subject to r.t., might show:
let { f x = g x;
g 0 = 0;
g n = f
Installing executable(s) in /home/david/.cabal/bin
why the hell would cabal install binaries in a subdirectory of a
hidden directory. Why not /home/david/bin or /home/david/local/bin ?
Yes, this is clearly suboptimal but getting agreement on where to put it
has not proved easy. There are users
thanks for your elaborations. I'm still not convinced that a common name
(e.g. TT :. Tr :. Tu :. Te) is a better interface than a common import
(e.g. TypeLevel.Bool.True). In both cases, the authors of all modules
have to actively collaborate, either to define common names, or to
define common
in case anyone stumbles over my ad-hoc notations, that should have been:
module A[type label] where x = undefined :: label
module B[type label] where x = undefined :: label
module C[type label] where
import A[label]
import B[label]
ok = [A.x,B.x]
assuming that:
- 'module X[types]' means a
).
Claus
On Tue, Apr 7, 2009 at 10:23 AM, Claus Reinke claus.rei...@talk21.com wrote:
I have become aware that many Haskellers are not aware of the
Haskell mode plugins for Vim, in spite of the 100 downloads
per month I saw when I last checked. Since the plugins have just
completed their move
|Yes, I found that one myself. My old ftplugin/haskell.vim used to
|have autoindent set, but importing your haskell mode overwrote that
|(slightly irritating behaviour if you ask me ;-). Putting my old
|config into ftplugin/haskell_mine.vim restored the behaviour.
Yes, one cannot have two
|data Test = Test { foo :: Int, bar :: Char, baz :: Bool }
|smallPrint t = concatMap (\f - show $ f t) [foo, bar, baz]
|In this code the list [foo, bar, baz] should have the type [exists a. Show a =
Test - a].
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ExistentialQuantification #-}
data EShow =
| But the core part of my suggestion (which this example was meant
| to help explain) remains attractive, at least to me: somewhere during
| type inference, GHC *does* unify the *apparently free* 'd' with an
| internal type variable (lets call it 'd1, as in the type error message)
You are
- if type-level tags (such as 'data TTrue'/'data TFalse') are declared
repeatedly in separate modules, they represent separate types,
preventing shared use (your type-level predicate doesn't return
my version of 'TTrue'/'TFalse')
How is the need for a common import for 'data TTrue;
but the fact that the breakout example works is an indication that at
least it's not hopelessly broken.
Well, a breakout game does *not* work (yet) in most other FRP
implementations except Yampa, which do have firm theoretical foundations :-)
While certainly more entertaining, the problem
The recent GHC trac ticket revision reminded me of the old open
type-sharing problem with type tags and record labels:
- if type-level tags (such as 'data TTrue'/'data TFalse') are declared
repeatedly in separate modules, they represent separate types,
preventing shared use (your
|Oh now i see what you mean: consider
|f' = abst . (id :: (d-a)-(d-a)) . appl
|which GHC understands to mean
|f' = abst . (id :: forall d a. (d-a)-(d-a)) . appl
|
|GHC infers the type
|f' :: (Fun d) = Memo d a - Memo d a
|Now you are saying that GHC *could* have figured
I remember hearing about a Haskell mode for Vim, Emacs, Yi or
VisualHaskell that inserts type declarations automatically (it's
lazier to just check the type than to write it manually), but I can't
remember any details. What editor mode / IDE was it?
As far as I know, my haskellmode plugins for
I have become aware that many Haskellers are not aware of the
Haskell mode plugins for Vim, in spite of the 100 downloads
per month I saw when I last checked. Since the plugins have just
completed their move to their new home at
http://projects.haskell.org/haskellmode-vim/
this seems to be a
http://projects.haskell.org/haskellmode-vim/
The download link on this page seems to use \ instead of /, making it not work.
For anyone eager to download it, just replace \ (or %5C) in your address bar
with \ and it should work.
argh, thanks, now fixed (filename completion in Vim, :help
Hi Matthijs,
I've installed the vimball, and it spit a few errors at me. In particular, it
couldn't find the haddock documentation directory. A quick look at
haskell_doc.vim shows that it should autodetect the directory. However, for
some reason my ghc-pkg command returns the doc directory
Basically, type checking proceeds in one of two modes: inferring or
checking. The former is when there is no signature is given; the
latter, if there is a user-supplied signature. GHC can infer
ambiguous signatures, but it cannot check them. This is of course
very confusing and we need
Matthijs,
thanks for the reports, and analyses and suggested patches are even
better! We should probably take this offlist at some point, though.
I've found two more little bugs. The first is that version comparison is
incorrect. It now requires that all components are greater, so comparing
| Here is a variation to make this point clearer:
|
| {-# LANGUAGE NoMonomorphismRestriction #-}
| {-# LANGUAGE TypeFamilies, ScopedTypeVariables #-}
|
| class Fun d where
| type Memo d :: * - *
| abst :: (d - a) - Memo d a
| appl :: Memo d a - (d - a)
|
| f = abst . appl
|
| -- f' ::
I want the Zen package: Make me one with everything.
But would you find that on hackage?-) If an author had contemplated
the perfect package, they wouldn't have put it on hackage, they wouldn't
have a hackage account, they wouldn't have written the package, they
might not even exist - you
Btw, there seem to be many Haskells on YouTube - should we have
some way of marking clips related to our Haskell? I've used haskell.org
as a tag, but noone else has, yet - also, perhaps there should be a Haskell
channel or something?
And just in case there are others on the same Windows
I seem to be having problems reaching anything on that server.
Does anyone know what is going on, or who to contact? It would
help if the haskellwiki page
http://www.haskell.org/haskellwiki/Haskell.org_domain
would mention the admin address directly, instead of referring to
of the connection.
If I read the bandwith graph correctly, there was a peak followed
by several hours of silence, matched by odd memory usage (though
I don't see what the load average is trying to tell us?):
http://community.haskell.org/mrtg/daily.html
Claus
On Mon, Apr 6, 2009 at 1:32 PM, Claus Reinke
takeListSt' = evalState . foldr k (return []) . map (State . splitAt)
where k m m'= cutNull $ do x-m; xs-m'; return (x:xs)
cutNull m = do s-get; if null s then return [] else m
|Not only is ths not that elegant anymore,
As I was saying, sequence/mapM with early cutout is
Hugs did not support lexically scoped type variables then (and
probably doesn't support now).
I may be misremembering, but I think Hugs had them first;-)
http://cvs.haskell.org/Hugs/pages/hugsman/exts.html#sect7.3.3
It is just that Hugs and GHC interpret the language extension
differently
One word says more than a thousand pictures: Vim http://www.vim.org/.
(well, okay, I'm sure Emacs will do just as well, and some of the more
recent IDEs seem to be catching up;-) plus plugins, of course!-)
- unfolding definitions: if you really want that, it is in the domain of
program
{-# LANGUAGE ScopedTypeVariables #-}
without, the 'f's in the instance are independent.
Claus
- Original Message -
From: Jacques Carette care...@mcmaster.ca
To: haskell-cafe@haskell.org
Sent: Thursday, April 02, 2009 10:15 PM
Subject: [Haskell-cafe] Issue with IsFunction/Vspace in GHC
But I am more interested in seeing the expansion and reduction that
the execution encounters as it lazily evaluates the function.
Have you tried GHood?
examples:
http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/GHood/
package:
my quest for data structures continues. Lately I came across Zippers.
Can anybody point be to some useful examples?
Once upon a time, there was a hardware implementation of a lambda
calculus based functional language (mostly, I was told, to show that it
could be done:-). The program
Did you use hubigraph?
http://ooxo.org/hubigraph/
Ah, there it is, then. Btw, more interesting than the 3d nature of
the visualizations is that Ubigraph seems to have been designed
for incremental updates of the layout (see the paper available
via their home site). The lack of support for
Perhaps the rumours refer to non-tagged versions? In
conventional non-distributed version control systems, one
might go back to the version on a specific date, while with
darcs, that only makes sense wrt a specific repo (I think?).
So you can unpull all patches after a date from your local
appendU is strict, insertWith just doesn't force it (follow the source link
in the haddocks to see why).
Ok, I see.
But, IMHO, this should be clearly documented.
There seems to be some agreement that strict variant operations should
also be provided, but it needs some more thinking, and
Can I close this ticket as not being to do with uvector?
-- Don
You did notice the suggestion that performance of uvector and bytestring
could be improved drastically if compile-time fusion would be augmented
with runtime fusion?
Claus
Is there anyone here with experience in screencasting of text-based
applications, who could offer advice on how to produce screencasts
on windows/xp? The basic screencasting (capture+annotation/editing)
is not the problem, eg, CamStudio seems ok, and Wink gives me
more control for mostly
| When I looked at it a year ago or so, it was a return of one
| constructor in a sum.
| Looking at core, you can see several places where a function is called
| and that function always returns the same constructor, so the case
| analysis of the return value is not needed; it should be returned
I wonder if I could write some sort of chunked fold which basically
still produces the same amount of thunks but in a way so that the do not
go on the stack all at once for reduction and thus do not cause a stack
overflow. Kind of a tree.
Not without re-associating the applications of the
I suppose having a good description of what I'd like to do might help: I'd
like to be able to make an N-Tuple an instance of a type class.
class Foo a where
instance Foo (,) where
instance Foo (,,) where
The different kindedness of (,) and (,,) prevent this from working.
Not that this
It looks like the scope is interrupted just above $( ... ) - but I'd
like to know why and find a more beautiful way than just moving all th
calls to the bottom of the module file :)
Top-level splices can introduce bindings. IIRC, the current TH
implementation uses a simple sequencing approach,
IntMap (UArr (Word16 :*: Word8))
I was adding elements to the map using something like:
v = map singletonU (a :*: b)
insertWith appendU k v m
However doing this eats a *lot* of memory.
Since 'insertWith' doesn't actually do the 'appendU', the appends
will also be compressed in
But Claus was right, appendU is lazy; this seems to be the cause of the
problem.
appendU is strict, insertWith just doesn't force it (follow the source link
in the haddocks to see why).
However now I don't really understand why the two implementations
differs in lazyness.
Or, to ask a
Continuing our adventures into stylistic and semantic differences:-)
Can you write this analysis on the wiki?
Hmm, we tried that in the past, and I haven't seen any indication
that people search for those things, let alone find them (one particular
example I recalled I still haven't been able
Continuing our adventures into stylistic and semantic differences:-)
Comparing the 'State' and explicit recursion versions
takeListSt = evalState . mapM (State . splitAt)
-- ..with a derivation leading to..
takeListSt []s = []
takeListSt (h:t) s = x : takeListSt t s'
safeDiv :: (Exception e, Integral a) =
a - a - Either e a
safeDiv x y = unsafePerformIO . try . evaluate $ div x y
I just want to know, from a theoretical point of view,
whether this 'safeDiv' in above definition is the same as
safeDiv' :: (Exception e, Integral a) =
a
The beauty of functional programming is that there doesn't have
to be a conflict between those who prefer explicit and those
who prefer implicit recursion. Think of them as different views
on the same functions - just as with graphical visualizations,
pick the view best suited to your purpose
Perhaps the make a video slogan doesn't quite explain what is
intended - it didn't to me!-) Reading John Udell's short article
What is Screencasting?
http://www.oreillynet.com/pub/a/oreilly/digitalmedia/2005/11/16/what-is-screencasting.html?page=1
gave me a better idea: the screen video part is
, interactive, profiling views
instead of the somewhat awkward PostScript generation of static
views.
Regards,
Duane Johnson
On Mar 20, 2009, at 5:36 PM, Claus Reinke wrote:
It would be great to have a video of this in action up on youtube.
You can simply 'recordmydesktop' on linux (and likely elsewhere
If above is true, I am confused why we have to distinguish the terms which
have NF and be in NF? isn't the terms have NF will eventually become in NF?
or there are some way to avoid them becoming in NF?
Another way to think about it: what about terms which have no NF?
And given both kinds of
The problem occurs when the result value is needed and thus the
thunks need to be reduced, starting with the outermost, which can't
be reduced without reducing the next one etc and it's these
reduction steps that are pushed on the stack until its size cause a
stack-overflow.
Yes,
It would be great to have a video of this in action up on youtube.
You can simply 'recordmydesktop' on linux (and likely elsewhere), then
upload the result.
I'm curious: how would a non-interactive animation running in Flash
in a browser be better than an interactive animation running in Java
/people/simonpj/papers/imprecise-exn.htm
[3] Functions, Frames, and Interactions, Claus Reinke (chapter 3)
http://www.cs.kent.ac.uk/~cr3/publications/phd.html
[4] Olivier Danvy et al, miscellaneous reports
http://www.brics.dk/~danvy/
[5] The Origins of Structural Operational Semantics
of this and upload it to
hackage, I'd be delighted. Hack away.
A GTP interface would be useful, to allow playing against other bots.
Cheers,
Simon
Simon Marlow wrote:
Claus Reinke wrote:
Do you have an example of a mutable state/ IO bound application, like,
hmm, a window manager or a revision
So that first step already relies on IO (where the two are equivalent).
Come again?
The first step in your implication chain was (without the return)
throw (ErrorCall urk!) = 1
== evaluate (throw (ErrorCall urk!)) = evaluate 1
but, using evaluation only (no context-sensitive IO), we
exception handling which allows to catch programming errors.
And which I have a sneaking suspicion actually *is* `unsafe'. Or, at
least, incapable of being given a compositional, continuous semantics.
A semantics for imprecise exceptions
main = do
r - newIORef 0
v - unsafeInterleaveIO $ do
writeIORef r 1
return 1
x - case f v of
0 - return 0
n - return (n - 1)
y - readIORef r
print y
-- a couple of examples:
f x = 0 -- program prints 0
-- f x = x -- program prints 1
f is
I'm getting a runtime failure Error in array index. This causes ghci
to exit.
Is there a way to get it to break instead, so I can find out which
function is failing?
i recall two techniques - one is trivially define your own (!) and
print index at least. another is to use ghc profiling with
Claus None of which is satisfactory. You might also want to add
Claus yourself to this ticket:
Clausindex out of range error message regression
Claus http://hackage.haskell.org/trac/ghc/ticket/2669
How do I do that?
Ghc Trac's idea of voting is by adding yourself to the cc, so
I agree that looking for a mascot that is inspired by laziness is a bad idea
from a P.R. perspective (I am tired of people walking out the room when I
give Haskell talks to general audiences and explain lazy evaluation).
Do they walk out when you mention it or when you explain it?-)
Lazy
uvector is, if my memory serves me correctly, a fork of the vector library.
It uses modern stream fusion, but is under active development and is a
little scary. I'm a little unclear on the exact difference between uvector
and vector. Both use arrays that are not pinned, so they can't be readily
I'm trying to catch up with all the wonderful Haskell Types, classes,
Abstract Data Types, Algebraic Data Types, Types that give peoples
headaches and all the other, deeper stuff I have been happily putting off.
Hmm, do we need more pragmas?-)
{-# LANGUAGE TypesThatGivePeopleHeadaches #-}
{-#
Due to a problem with the template-haskell package and Cabal, you
cannot cabal-install the emgm package with GHC 6.8. However, take
heart! EMGM works very well with GHC 6.8. You merely have to download
the tar.gz package from Hackage yourself, build it, and install it.
I thought I had seen you
At first guess it sounds like you're holding onto too much, if not the
whole stream perhaps bits within each chunk.
It is possible.
I split the string in lines, then map some functions on each line to
parse the data, and finally calling toU, for converting to an UArr.
Just to make sure
I split the string in lines, then map some functions on each line to
parse the data, and finally calling toU, for converting to an UArr.
Just to make sure (code fragments or, better, reduced examples
would make it easier to see what the discussion is about): are you
forcing the UArr to be
That helps to make things clearer, I think. One issue is
the nature of Maps (strict in keys, non-strict in values).
- neither singleton nor unionWith are strict in the Map values, so
nothing here forces the evaluation of rate or constructionof UArr
But, as I have written, in one of my
btw, i always thought that it should be a way to overcome any export
lists and go directly to module internals. limiting export is the way
to protect programmer from errors, not security feature, and it should
be left to programmer to decide when he don't need it. compilers
should just be able to
sitting in a pub with some beer having a platform war). Martijn's
thoughts of +windows, +unix, +os is exactly right, I'm happy to let
users say oh, please show me these packages, but there are
trade-offs in Hoogle design. If someone has some clear viewpoint on
the answers, I'd love to hear them.
Concrete examples always help, thanks.
Turning this into a ticket with associated test will:
- enable others to find and repeat the test when this thread is long gone,
to see whether any other ghc changes have helped in any way
- enable documentation of what exactly the issue is (why is it
1) Show all the functions (when the number is low), but place platform
specific functions under separate headers: Windows,
Linux/BSD/POSIX, OS X, etc.
If a function isn't available on all OS's then all Hoogle would be
encouraging you to do is break compatibility and stop me from using
your
Turning this into a ticket with associated test will:
but why you think that this is untypical and needs a ticket? ;)
Because generally ghc is doing a good-enough job. And it is doing
that because long ago, ghc hq's war cry was if ghc generates code
that is slower than any other haskell
Check out what GHC is doing these days, and come back with an analysis
of what still needs to be improved. We can't wait to hear!
can you point me to any haskell code that is as fast as it's C
equivalent?
You should do your own benchmarking!
Please, folks! This is hardly helpful.
It isn't
A common standard would be useful, but OpenVG doesn't look
like ready soon. On the declarative side, there's also SVG..
Seems I've got to qualify that remark somewhat - apart from some
commercial/closed-source implementations, there is also a open
source ANSI C one (implemented on top of
When I said Cairo felt rather slow, I was comparing it again fully hardware
accelerated solutions.
..
IMO the future is fully hardware accelerated rendering on the GPU, like OpenVG.
It will take a while before it is common to see glyphs being rendered on the
GPU, but I'm sure this is all doable.
I should have mentioned that my tests have been done only on Windows and
OSX.
I guess I would have to try on a system that supports XRender to compare.
Unfortunately, the target audience of our application are mostly windows and
OSX users, so although it would be great that Cairo performs fast
Yes. If you've got a set of terminating computations, and it has
multiple distinct elements, it generally doesn't *have* a least element.
The P in CPO stands for Partial.
and this concern does not apply to () .
Btw, what would a non-lifted () be used for?
If the least element _|_ is known
2) the Haskell docs _don't_ do good enough a job at giving intuition
for what math terms mean
If we fix #2, then #1 is no longer a problem, yes?
For you folks who work on GHC, is it acceptable to open tickets for
poor documentation of modules in base? I think leaving the
documentation to the
What I don't understand is why Monoid and Monad are objectionable, while
Hash, Vector, Boolean, and Integer are (presumably) not objectionable.
They all appear equally technical to me.
It's simply that other languages' libraries already have those terms in
them. So there is nothing new to
You were asking about getting the output of ':show modules' into a
variable 'x', so that you can process it further. ':redir x :show modules'
should do just that. There is another example command for implementing
':edit' this way (by now a native ghci command).
I think I'm seeing your meaning.
Well, sort of. Ok, we can parse that. Let's assume a variable x holds
the output of :show modules as a String. We call lines on it, then map
words on it, do a !! 2 on it, and we get [Util.hs,, Recorder.hs,,
Game.hs,, Monadius.hs,, Demo.hs,]. Chuck in a map (filter (\=
',')), and we get a good
Well, sort of. Ok, we can parse that. Let's assume a variable x holds
the output of :show modules as a String. We call lines on it, then map
words on it, do a !! 2 on it, and we get [Util.hs,, Recorder.hs,,
Game.hs,, Monadius.hs,, Demo.hs,]. Chuck in a map (filter (\=
',')), and we get a good
The Haskell syntax script for vim mentions this mailing list as the
maintainer. Perhaps one of you could fix this bug.
Comments on the same line as import declarations don't get highlighted:
I don't know how this list-as-maintainer idea is going to work,
but the fix seems straightforward: find
Let's see what David thinks. If he thinks is possible to fix these kinds
of things where haddock is not covering the whole GHC AST (at least to
the degree where it can ignore bits it does not understand). If that's
not realistic in the short term then we probably should introduce some
haddock
I would be happy to work around it if I could, but I can't. As far as I can
tell, I can't pass any flags to Haddock via the Cabal file. I would love to
tell Hackage to run Haddock like so, cabal haddock
--haddock-option=--optghc=-D__HADDOCK__, but I don't know how.
Let's suppose that I do
Still, you might find something useful in the discussion for this ticket:
Cabal should support Cabal-version-dependent Setup.hs
http://hackage.haskell.org/trac/hackage/ticket/326
or, more directly:
http://www.haskell.org/pipermail/cabal-devel/2008-August/003576.html
so, if you add the
For this purpose, the only thing better is if we could somehow
get them to mention Microsoft everywhere they mention Haskell.
Any actual explaining would just get in the way :)
Doesn't quite work without explaining, because one would have
to be very careful not to mis-represent financial
I finally got round to trying cabal-install with OpenGL/GLUT,
using a freshly built ghc head, a cygwin bash, and
http://haskell.org/~duncan/cabal/cabal.exe
cabal-install version 0.6.0
using version 1.6.0.1 of the Cabal library
Yes, building it requires mingw/msys, but with it cabal
ghc --make -package OpenGL -package GLUT something.hs
I get nothing but undefined references in the linking phase.
C:\Program
Files\Haskell\GLUT-2.1.1.2\ghc-6.11.20081202/libHSGLUT-2.1.1.2.a(Window.o):fake:
(.text+0x15): undefined reference to `glutWarpPointer'
Does ghc-pkg describe
I believe these errors are caused by the wrong calling convention
being used in the Haskell bindings. This part in the configure script
tests the build (host) platform:
case $host in
*-mingw32) CALLCONV=stdcall ;;
*) CALLCONV=ccall ;;
esac
Since it doesn't test for Cygwin, you end up with
Should mutable arrays have list-like APIs? All the usual operations,
just in-place and destructive where appropriate?
I don't know. To be honest, I don't think that the term mutable
array describes a single data structure. For instance, one of the
central questions which unveils a whole
CE.catch :: (CE.Exception e) = IO a - (e - IO a) - IO a
foo d = CE.catch (openFile d ReadMode return ())
(\e - hPutStr stderr (Couldn't open ++ d ++: ++ show e))
btw, if your handler cannot return the same type as your action, is this
the right place to catch the
But I don't want Perl, I want a well designed language and well
designed libraries.
I think it's find to let libraries proliferate, but at some point you
also need to step back and abstract.
-- Lennart
Especially so if the free marketeers claim there is something
fundamentally wrong with the
Yes, it is very difficult. A sensible API for a standard array library
is something that needs more research. FWIW, I don't know of any other
language that has what I'd like to see in Haskell. C++ probably comes
closest but they have it easy - they don't do fusion.
I assume you've looked
Do you have an example of a mutable state/ IO bound application, like,
hmm, a window manager or a revision control system or a file system...?
If you're looking for a challenge, how about this one (there used to
be lots of Haskellers into this game, any of you still around?-):
http://computer-go.org/pipermail/computer-go/2008-October/016680.html
Interestingly, I did this a while ago. Here's my results:
$ ./Bench 1 10
b: 14840, w: 17143 mercy: 67982
elapsed time: 3.42s
playouts/sec: 29208
so, nearly 30k/sec random playouts on 9x9. That's using a hack that stops
What do those folks working on parallel Haskell arrays think about the
sequential Haskell array baseline performance?
Try using a fast array library like uvector? (With no serious overhead for
tuples too, fwiw)...
I downloaded uvector a while ago, but haven't got round to trying it
(yet
Luke Palmer wrote:
I've been wondering, is it ever possible to have two (extensionally)
different Functor instances for the same type? I do mean in Haskell;
i.e. (,) doesn't count. I've failed to either come up with any
examples or prove that they all must be the same using the laws.
For
Are identity and composition sufficient to guarantee that the
mapped function is actually applied?
eek - f :: a - b, not f :: a - a, so that example doesn't work !!
Sorry for the noise,
Claus
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
- i am interested in a first-principles notion of data. Neither lambda
nor π-calculus come with a criterion for determining which terms represent
data and which programs. You can shoe-horn in such notions -- and it is
clear that practical programming relies on such a separation -- but
101 - 200 of 545 matches
Mail list logo