The point in not allowing partially applied type synonym instances is
that it'd make deciding whether a type is an instance of a class much
harder.
Cf. here[1] for a similar question with the Category class.
-- Steffen
[1] Attached message. Couldn't find it on the archives..
On 04/14/2013
This one[1] sounds so awesome! I just read the paper.
In particular I like how one could access the current call stack
structure live.
However, the most recent changes to the code are from early 2009.
Anyone knows what happened to this?
[1]
not yet sure which level of granularity I want for error messages
and one can probably get arbitrarily fancy on this.
For the moment I think it would be enough to auto-insert the location of
calls to a certain set of functions.
Any experience on this?
Thanks a lot.
-- Steffen
, 2013 at 12:23 AM, Steffen Schuldenzucker
sschuldenzuc...@uni-bonn.de wrote:
For the moment I think it would be enough to auto-insert the location of
calls to a certain set of functions.
Have you tried assert [1]?
[1]
http://hackage.haskell.org/packages/archive/base/4.6.0.1/doc/html/Control
Nil = Nil
instance (Monoid a, Monoid bs) = Monoid (Cons a bs) where
mempty = Cons mempty mempty
mappend (Cons x1 ys1) (Cons x2 ys2) = Cons (mappend x1 x2) (mappend
ys1 ys2)
-- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
language or GUI allows great
flexibility
in both defining events and generating reports. See e.g. the 'lecture'
combinator from Apphointments.Util.
Status
--
Works for me, but has no features yet.
See TODO.
Credits
---
Created by Steffen Schuldenzucker sschuldenzuc...@uni-bonn.de
looking for a
Monoid instead (see above)
-- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
your 'Fold' type with an additional
state (done or not yet done).
Also, the pipe package seems to provide something similar.
-- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
time error.
-- Steffen
[1]
http://hackage.haskell.org/packages/archive/notcpp/0.0.1/doc/html/NotCPP-ScopeLookup.html
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
not accidentally).
You might want to take a look at iteratees or conduits.
-- Steffen
2012/3/10 Anthony Cowleyacow...@gmail.com:
From that profiling data, I think you're just seeing a decrease in sharing.
With one thread, you create the list structure in memory: the first fold could
consume
threads while it's running, hence the name.
-- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
= showString (unsafePerformIO $ axiomIO str)
-- Examples of usage
tl;dr, but did you try to write your program without using
unsafePerformIO? It's considered harmful for a reason.
Cheers, Steffen
... (same code as above, but 'd' is bound now)
...
instance WalkableBinTree (BT x) x where
...
-- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 01/06/2012 11:51 AM, Steve Horne wrote:
On 06/01/2012 10:29, Steffen Schuldenzucker wrote:
On 01/06/2012 11:16 AM, Steve Horne wrote:
[...]
module BinTree ( WalkableBinTree, BT (Branch, Empty) ) where
-- n : node type
-- d : data item type wrapped in each node
class WalkableBinTree n
, AList, BList, CList
will /not/ be seen as separate types (but they're all the same type,
namely [Event]).
If you want separate types, you would use a newtype wrapper like
newtype AList = AList [Event]
deriving (some instances you want to derive from [Event])
-- Steffen
Cheers, Steffen
On 12/04/2011 06:53 AM, Scott Lawrence wrote:
(Sorry if this email is rather unclear - I know my desired end result,
but neither how to acheive nor explain it well. Here goes.)
I'm processing lists, using them sortof as streams. (Whether that's a
good idea isn't the issue here
On 10/05/2011 11:30 PM, Alberto G. Corona wrote:
if Hlist is sugarized as variable length tuples, then the initial code
would compile without noticing the use of HList...
Seems to me like the advantage of such a sugaring would be that people
could use a complex framework without actually
On 10/03/2011 10:42 PM, Magicloud Magiclouds wrote:
Hi,
I have a function:
post :: (ToJson p, FromJson q) = String - String - String -
Map.Map String p - IO q
Now I'd like to call it like:
r- post site token user.addMedia (Map.fromList [ (users, users :: ToJson)
github mirror or hackage). As I've made
some extensive changes I will continue maintaining the syntax file (unless
someone else really wants to do it...), but I'd prefer it to be a
haskell-comunity project so other people can join in easily and propose
changes.
- Steffen
Forwarding to list
Original Message
Subject:Re: [Haskell-cafe] How to select last inserted record from
Table Using Database.HSQL.MySQL
Date: Tue, 26 Jul 2011 14:27:56 +0300
From: Sergiy Nazarenko nazarenko.ser...@gmail.com
To: Steffen Schuldenzucker sschuldenzuc
sql databases.
-- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
]) (Cycle $ fromList [1])
True
*Main smartEq (Cons 2 $ Cycle $ fromList [1]) (Cycle $ fromList [1])
False
Any examples for hangups of 'smartEq' are greatly appreciated, I
couldn't produce any so far.
-- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe
On 07/21/2011 02:15 PM, Alexey Khudyakov wrote:
Any examples for hangups of 'smartEq' are greatly appreciated, I couldn't
produce any so far.
Following sequences will hang smartEq. They are both infinite and aperiodic.
smartEq (fromList primes) (fromList primes)
smartEq (fromList pidigits)
EmptyTree = show Empty
show (Node (Int, Int) left right) = ..
I'm afraid to say that, but 'Int' doesn't make sense at this place. You
would want
show (Node (x, y) left right) = ...
instead. (That is, use any variables. Variables have to be lowercase.)
-- Steffen
' does not add
an AssignCap constraint, 'test' must not either.
Hope that helps. Steffen
Thanks,
-Ryan
{-# LANGUAGE GADTs #-}
class AssignCap m
data PureT
data IOT
instance AssignCap IOT
data E m where
Assign :: AssignCap m = V - E m - E m - E m
Varref :: V - E m
-- ...
type V
:: p a - a
instance Points Point where
-- copy'n'paste from above
-- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
) or map Prelude.id (given by your instance)?
-- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
retain/release for
them by yourself, but by convention you don't do so...), but the counter may
be accessed directly in memory. That's why ARC (if you follow Apple's
conventions about object ownership) can be much more efficient than the
current implementation.
- Steffen
to consult the haskell wiki[1].
-- Steffen
[1] http://haskell.org/haskellwiki/GHC/AdvancedOverlap
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
a) = Bool - [a] - [a] - Bool
generates precisely xs g = if null g
then null xs
else (not precisely || length xs `mod` length g == 0)
xs `isPrefixOf` cycle g
-- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
Forwarding to -cafe
Original Message
Subject:Re: [Haskell-cafe] Period of a sequence
Date: Mon, 27 Jun 2011 04:46:10 -0700 (PDT)
From: michael rice nowg...@yahoo.com
To: Steffen Schuldenzucker sschuldenzuc...@uni-bonn.de
Hi Steffen,
Repeating decimals.
5/7
Michael,
On 06/27/2011 01:51 PM, Steffen Schuldenzucker wrote:
Forwarding to -cafe
Original Message
Subject: Re: [Haskell-cafe] Period of a sequence
Date: Mon, 27 Jun 2011 04:46:10 -0700 (PDT)
From: michael rice nowg...@yahoo.com
To: Steffen Schuldenzucker sschuldenzuc
://hackage.haskell.org is
69.30.63.204
Same result for me.
I also cannot access any of the Hackage web pages.
No problem here.
What is the error for you? hackage.haskell.org doesn't seem to answer
pings btw.
-- Steffen
___
Haskell-Cafe mailing
Forwarding to -cafe.
Original Message
Subject:Re: [Haskell-cafe] Hackage Server not reachable
Date: Wed, 22 Jun 2011 20:43:59 +1000
From: Stuart Coyle stuart.co...@gmail.com
To: Steffen Schuldenzucker sschuldenzuc...@uni-bonn.de
Cabal fails with a timeout
= 3 :: (Integral x = x)
*Main :t i3
i3 :: Integer
and the same thing happens on the (newId startId) side, too.
As one last remark, your original problem that caused the Ambiguous
type variable error looks very similar to the well-known (show . read)
problem.
-- Steffen
Am 03.06.2011 10:32, schrieb Guy:
What might --| mean, if not a comment? It doesn't seem possible to
define it as an operator.
Obviously, anyone who is going to write a formal logic framework would
want to define the following operators ;) :
T |- phi: T proves phi
T |-- phi: T proves phi
On 05/06/2011 08:07 PM, Andrew Coppin wrote:
[...]
I currently have a website, but it supports only CGI *scripts* (i.e.,
Perl or PHP). It does not support arbitrary CGI *binaries*, which is
what I'd want for Haskell. In fact, I don't have control over the web
server at all; I just put content on
On 04/28/2011 05:23 PM, malcolm.wallace wrote:
Unfortunately, sharing a build directory between separate repositories
does not work. After a build from one repository, all the outputs from
that build will have modification times more recent than all the files
in the other repository.
Then I
forM [1..graphSize] loop. Try:
weights - replicateM (length others) $ randomRIO (1, 10)
instead.
-- Steffen
But I noticed that graph has sometimes same weights on different
edges. This is very unlikely to happen so probably I have some error
using random generators. Could somebody tell me
- Double - Shape
rectangle x y w h = ... (analogous)
shapes = [rectangle 1 2 3 4, circle 4 3 2, circle 1 1 1]
-- Steffen
On 03/29/2011 07:49 AM, Tad Doxsee wrote:
I've been trying to learn Haskell for a while now, and recently
wanted to do something that's very common in the object oriented
There is no SDK for older Mac OS X Releases in XCode 4, but for iPhone...
Not even in the Resources/Packages.
Indeed Apple did remove support for older Systems then snow leopard in its
new development tools.
For that reason and problems with no support of IB Plugins one is encouraged
not to
/Versions/Current/usr/share/doc/ghc/html/libraries/ghc-7.0.2/src/Config.html
So we either have to copy or symling /Developer-old/SDKs/MacOSX10.5.sdk to
/Developer/SDKs or someone is going to recompile ghc with snow leopard only
in mind.
- Steffen
just fine, but I will keep a copy of crt1.10.5.o before upgrading to Xcode
4 just in case and report any findings.
- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Questions:
1. How did you install ghc-7? Using a binary package? The one for leopard or
snow leopard?
2. Which compiler flags did you use? Does it work with another backend?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
] in this direction can however be
taken with the current state of the language.
-- Steffen
[1] http://haskell.org/haskellwiki/GHC/AdvancedOverlap
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 02/11/2011 12:06 PM, C K Kashyap wrote:
[...]
I know that static typing and strong typing of Haskell eliminate a
whole class of problems - is that related to the proving correctness?
[...]
You might have read about free theorems arising from types. They are a
method to derive certain
: add a type signature that fixes these type variable(s)
And then, specializing evil's type:
let good = appendLog Foo Bar :: Sealed Admin String
unseal (undefined :: Admin) good
FooBar
-- Steffen
On 02/09/2011 06:15 PM, Cristiano Paris wrote:
Hi all,
I've a type problem that I cannot solve
On 02/07/2011 12:45 PM, C K Kashyap wrote:
$ ghci
GHCi, version 6.12.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package
sendSomeAnswer conn $ processSomeData someData
...
-- Steffen
Regards,
Kashyap
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
___
Haskell-Cafe
$ prep ++ request
runServer r
And then:
*MyModule r - startMyServer
(plain echo server running)
*MyModule someFunction hello r
(now echo server with prepend hello)
*MyModule someFunction world r
(now echo server with prepend helloworld)
-- Steffen
On 02/04/2011 03:41 PM, C K Kashyap wrote
Dear cafe,
does anyone have an explanation for this?:
error (error foo)
*** Exception: foo
error $ error foo
*** Exception: *** Exception: foo
-- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
Thanks to all of you for making GHC's behaviour yet a bit clearer to me.
On 02/03/2011 11:25 PM, Daniel Fischer wrote:
On Thursday 03 February 2011 23:03:36, Luke Palmer wrote:
This is probably a result of strictness analysis. error is
technically strict, so it is reasonable to optimize
) = [t] - (t, t1)
-- Steffen
On 01/31/2011 06:29 PM, michael rice wrote:
I'm mapping a function over a list of data, where the mapping function is
determined from the data.
g f l = map (g l) l
So
g serialize prolog - [4,5,3,2,3,1]
But I'm having typing problems trying to do a similar thing
such as
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
data Wrapper a = Wrap a deriving (Eq, Ord, Read, Show, Num)
-- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
= const Centimetre as in the instance for Metre
Steffen
On 01/28/2011 12:42 PM, Patrick Browne wrote:
Below is some code that is produces information about the *types* used
for measuring (e.g. metres). The following evaluation returns 1.00
which the convert factor for metres
.
Is there any work to combine the two?
You might want to take a look at [1, 2]XML Picklers from [3]HXT.
Steffen
[1]
http://www.haskell.org/haskellwiki/HXT/Conversion_of_Haskell_data_from/to_XML
[2] http://blog.typlab.com/2009/11/writing-a-generic-xml-pickler/
[3] http://hackage.haskell.org/package
did you try Debug.Trace?
http://haskell.org/ghc/docs/latest/html/libraries/base/Debug-Trace.html
On Jan 25, 3:39 am, Aaron Gray aaronngray.li...@gmail.com wrote:
On 25 January 2011 02:12, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.comwrote:
On 25 January 2011 12:05, Aaron Gray
Hi,
some time ago I read of a small tool that extracts lines like GHCi
some_expression from a source file and appends GHCi's output to them.
Now I can't find it again. Does anyone remember its name?
Thanks. Steffen
___
Haskell-Cafe mailing list
On 01/23/2011 06:48 PM, Max Rabkin wrote:
On Sun, Jan 23, 2011 at 12:35, Steffen Schuldenzucker
sschuldenzuc...@uni-bonn.de wrote:
Hi,
some time ago I read of a small tool that extracts lines like GHCi
some_expression from a source file and appends GHCi's output to them.
Now I can't find
Am 05.01.2011 09:24, schrieb Magicloud Magiclouds:
Hi,
I am using Data.Binary which defined instance Binary a = Binary
[a]. Now I need to define instance Binary [String] to make
something special for string list.
How to make it work? I looked into the chapter of
overlappinginstances,
On Dec 1, 2010, at 8:38 PM, Antoine Latter wrote:
If you're doing user installations of packages with 'cabal-install' it
will take care of everything - all of the things that it installs are
in per-GHC-version directories.
...
Except for the haddock documentation that cabal-install
Hi Andy,
Can you please do something about the sound track? Loads of people are
not able to view your video, because the used content/sound track is
not available in every country... meaning youtube prohibits viewing
your video.
On 28 Nov., 17:30, Andy Stewart lazycat.mana...@gmail.com wrote:
the launcher thing, Manatee
modes and window management into one application. Maybe by making
Manatee an opt in module for xmonad?!? Would this be possible?
On 30 Nov., 15:10, Andy Stewart lazycat.mana...@gmail.com wrote:
steffen steffen.sier...@googlemail.com writes:
Hi Andy,
Can you please
1. Write one routine, which does all the work for just one command.
2. use sequence or mapM, mapM_ from Control.Monad (depending on your
needs),
to apply your function to a list of commands
accumulating results you may want to process the output of sequence
or use the WriterT Monad
...@gmail.com wrote:
Nobody had the compilation messages I had?
-- Forwarded message --
From: Dupont Corentin corentin.dup...@gmail.com
Date: Tue, Nov 2, 2010 at 2:30 PM
Subject: [Haskell-cafe] DSL libraries (Was: Map constructor in a DSL)
To: steffen steffen.sier
On 11/02/2010 10:40 AM, Yves Parès wrote:
Because he would have either to recompile the whole program or to use
things like hint, both implying that GHC must be installed on the user
side (600Mo+ for GHC 6.12.3)
Isn't there a way to use some stripped-down version of ghc and the base
libraries,
was automatic in Haskell, well I was
wrong... Thanks !
Just out of curiosity: Does it work if you omit eval's type signature?
-- Steffen
2010/11/1 Sjoerd Visscher sjo...@w3future.com mailto:sjo...@w3future.com
Hi,
There's nothing wrong with your type families. The problem
Horribly enough this one seems to work...
mapOnBofA :: SB a - SA a
mapOnBofA mf = get = \st@(A {b=temp}) -
let (ans,temp2) = runState mf temp
in put (st { b=temp2}) return ans
There is nothing horrible about that. You just run a new isolated
computation in
29, 2010 at 6:19 PM, steffen
steffen.sier...@googlemail.comwrote:
Horribly enough this one seems to work...
mapOnBofA :: SB a - SA a
mapOnBofA mf = get = \st@(A {b=temp}) -
let (ans,temp2) = runState mf temp
in put (st { b=temp2}) return ans
29, 2010 at 6:19 PM, steffen
steffen.sier...@googlemail.comwrote:
Horribly enough this one seems to work...
mapOnBofA :: SB a - SA a
mapOnBofA mf = get = \st@(A {b=temp}) -
let (ans,temp2) = runState mf temp
in put (st { b=temp2}) return ans
and deduce
Map from it.
But maybe I have to add a List constructor for that.
But in the suggestions from Ryan and Brandon I don't understand why I should
add an extra type parameter and what it is!
Steffen: Wow nice. I'll integrate that ;)
I'm also looking at the Atom's DSL to get inspiration
Hi,
I think you may want to over think your types again.
Especially your Evaluator-Monad, and maybe your Map constructor.
The Problem is, due to your use of Either and the need for evalObs to
finally transform from Obs [a] type to Evaluator [a] you will end
up in another Monad for Either:
)
(sequence = return . sequence)
On 27 Okt., 06:12, steffen steffen.sier...@googlemail.com wrote:
Hi,
I think you may want to over think your types again.
Especially your Evaluator-Monad, and maybe your Map constructor.
The Problem is, due to your use of Either and the need for evalObs to
finally
I trying to learn a bit about data parallel haskell, and started from the
wiki page here:http://www.haskell.org/haskellwiki/GHC/Data_Parallel_Haskell.
Two questions:
The examples express the dot product as:
dotp_double xs ys = sumP [:x *
I don't know too much about GADTs, but it works fine with fundeps:
http://hpaste.org/40535/finite_list_with_fundeps
(This is rather a draft. If anyone can help me out with the TODOs, I'd be
happy.)
-- Steffen
On 10/13/2010 10:40 AM, Eugene Kirpichov wrote:
Well, in my implementation it's
Hmm, ok, I simplified the idea[1] and it looks like I'm getting the same
problem as you when trying to drop the 'n' parameter carrying the length of
the list.
Sad thing.
[1] http://hpaste.org/40538/finite_list__not_as_easy_as_i
On 10/13/2010 10:43 AM, Steffen Schuldenzucker wrote:
I don't
A slightly different suggestion from Simon PJ and myself (we agreed on
something syntax-related :-) is the following:
\case 1 - f
2 - g
...
\case { 1 - f; 2 - g }
+1
I like this because it has exactly the same properties of Max's
case-of, but is shorter and still reads
calls the shell command echo to print some
lines) you can try in ghci by typing runTest test...
[1] http://gist.github.com/614246
On 3 Okt., 16:56, C K Kashyap ckkash...@gmail.com wrote:
On Sun, Oct 3, 2010 at 5:22 PM, steffen steffen.sier...@googlemail.com
wrote:
If you don't want to mention r1
Don't be to disappointed. One can always kinda fake lazy evaluation
using mutable cells.
But not that elegantly. In the example given above, all being used is
iterators as streams... this can also be expressed using lazy lists,
true. But one big difference between e.g. lazy lists and iterators is,
Telling from the video and the slide, Neil's make system is actually
really cool. Indeed something I would really enjoy to use. It support
dynamic and static dependency tracking (more or less) out of the box
(by storing dependencies in a database file).
So you use want and need to tell the system
If you don't want to mention r1 explicitly, but want to refer to
target, sources and such only a monadic approach (e.g. Reader
Monad) might be what you want.
On Oct 3, 6:14 am, C K Kashyap ckkash...@gmail.com wrote:
Thanks Emil ... yeah, that works...I was wondering what I could do to
not
If you are really interested in embedded realtime code you may want to have a
look at the timber language[1] or bit-c[2]. Another very interesting project
is this[3] developing a new Haskell like language called Habit for systems
programming.
There are also some great papers about systems
While we are at it using Semantic Editor Combinators (sec on hackage):
{-# LANGUAGE TemplateHaskell #-}
module T where
import Data.SemanticEditors
data MyRecord = MyRecord { field1 :: String, field2 :: Int, field3 :: Bool
}
deriving(Show)
mkEditors [''MyRecord]
editRecord str =
On 07/17/2010 03:50 AM, Gábor Lehel wrote:
Does TypeEq a c HFalse imply proof of inequality, or unprovability
of equality?
Shouldn't these two be equivalent for types?
On Sat, Jul 17, 2010 at 2:32 AM, Steffen Schuldenzucker
sschuldenzuc...@uni-bonn.de wrote:
On 07/17/2010 01:08 AM, Paul L
[c] *except* for
-- a ~ c.
instance (TypeEq a c x, x ~ HFalse) = a b [c] where -- ...
Best regards,
Steffen
[1]
http://hackage.haskell.org/packages/archive/HList/0.2.3/doc/html/Data-HList-FakePrelude.html#t%3ATypeEq
(Note that for it to work over all types, you have to import one
your data structures to numbers? In that case, only
numbers of limited size, the answer is, of course, yes. You can
implement any such function in constant space and time. Just make a
lookup table.
Sent from my iPad
On Jul 6, 2010, at 6:37, Steffen Schuldenzucker
sschuldenzuc...@uni
: Tue, 6 Jul 2010 13:25:57 +1200
From: Richard O'Keefe o...@cs.otago.ac.nz
To: Steffen Schuldenzucker sschuldenzuc...@uni-bonn.de
On Jul 6, 2010, at 12:23 AM, Steffen Schuldenzucker wrote:
Given the definition of a recursive function f in, say, haskell,
determine if f can be implemented
On 7/5/2010 8:33 PM, Andrew Coppin wrote:
Tillmann Rendel wrote:
Hi Steffen,
Steffen Schuldenzucker wrote:
Given the definition of a recursive function f in, say, haskell,
determine if f can be implemented in O(1) memory.
Constant functions are implementable in O(1) memory, but interpreters
found a way which does not radically alter f's structure).
So, does someone know how to solve this or can prove that it can't be
solved?
Best regards,
Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
to be in scope, and
'a' isn't.
There's a GHC ticket for this: http://hackage.haskell.org/trac/ghc/ticket/3714
This works (on my ghc-6.12.2):
class Rfunctor f where
type F f :: * - *
(%) :: f a b - (a - b) - F f a - F f b
[...]
-- Steffen
the HList paper now...
Best regards,
Steffen
http://okmij.org/ftp/Haskell/types.html#class-based-dispatch
-Brent
On Mon, May 31, 2010 at 01:32:18PM +0200, Steffen Schuldenzucker wrote:
Dear Cafe,
let:
data True
data False
class C a
(arbitrary instances for C may follow)
Now, how
(instances for Elem so that Elem x l iff x is an element of the list l)
Now I want:
type family Insert x s :: *
Insert x s = s forall (x, s) with (Elem x s)
Insert x s = Cons x s for all other (x, s).
Thanks a lot!
Steffen
[1] http://hpaste.org/fastcgi/hpaste.fcgi/view?id=25832
Hi.
Stephen Tetley wrote:
Hi Eugene
Is something like this close to what you want:
For example this builds an object with ordered strings...
makeOrdered :: String - String - String - Object
makeOrdered a b c = let (s,t,u) = sort3 (a,b,c) in Object s t u
Or just:
makeOrdered a b c = let
mkBounded :: (Bounded a, Ord a) = (b - a) - b - Maybe a
mkBounded f x = case f x of
y | minBound = y y = maxBound - Just y
| otherwise - Nothing
mkRange1 :: Integer - Maybe Range1
mkRange1 = mkBounded Range1
-- Steffen
(Wrap f) * (Wrap x) = Wrap $ f x
convBinOp :: (a - a - a) - (Wrapped a - Wrapped a - Wrapped a)
convBinOp op x y = pure op * x * y
Best regards,
Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo
, but has been given 0
In the instance declaration for `X A_2 Int'
However, this error message looks strange. I tried to reduce this to a
simpler case[1] and got the same message.
Does anyone know why it complains just about the number of type
arguments (which is correct) ?
-- Steffen
[1
Brent Yorgey wrote:
On Mon, Jan 04, 2010 at 11:49:33PM +0100, Steffen Schuldenzucker wrote:
[...]
As others have pointed out, this doesn't typecheck; but what it DOES
show is that if we had a type class
class Endofunctor a where
efmap :: (a - a) - f a - f a
then it would
$ x * 9 + 4
fmap (+1) . fmap (*3) $ (Foo x) == Foo $ x * 3 * 3 + 1 + 1
== Foo $ x * 9 + 2
-- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
on the function how much information about the
parameters can be read from the result.
-- Steffen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Andrew Coppin wrote:
I just meant it's not immediately clear how
foo :: forall x. (x - x - y)
is different from
foo :: (forall x. x - x) - y
Uhm, I guess you meant
foo :: forall x. ((x - x) - y)
VS.
foo :: (forall x. x - x) - y
, didn't you?
1 - 100 of 129 matches
Mail list logo