Hi,
Am Freitag, den 02.07.2010, 12:55 +1000 schrieb Ivan Miljenovic:
> This can be resolved by putting the build-depends line in the if
> statement (and should maybe put up the top of the executable section
> to make it more obvious):
the latter was not possible last time I checked.
Greetings,
Simon Peyton-Jones wrote:
> Until now, no one has know how to combine fundeps and local constraints.
> For example
> class C a b | a->b where
> op :: a -> b
> instance C Int Bool where
> op n = n>0
> data T a where
> T1 :: T a
> T2 :: T Int
> -- Does this typecheck?
>
If you have not read it yet give http://learnyouahaskell.com a look.
Towards the end he walks through some of these kind of design issues
starting with types and functions working on the types.
Also, try putting the types and functions in a file and then loading the
file in ghci with "ghci foo.hs"
On Thu, Jul 1, 2010 at 4:26 PM, Bas van Dijk wrote:
> On Thu, Jul 1, 2010 at 6:50 PM, Don Stewart wrote:
>> I think we need to standardise the presentation of this data, and
>> provide a lib to access it.
>
> This, together with reverse dependencies[1], would be a nice feature
> for the upcoming
On 2 July 2010 04:48, David Menendez wrote:
> Maybe you're thinking of equality superclasses. In another thread,
> this example came up:
>
> | class (DerivedOf a ~ derived) => Typecheck a derived where
>
> which doesn't work yet, but should work in 6.14.
I've asked Manuel Chakravarty about this,
On 1 July 2010 17:25, Vincent Hanquez wrote:
> The main reason for this library is the lack of incremental api exposed by
> current digest libraries, and filling the void about some missing digest
> algorithms; Also the speed comes as a nice bonus.
Can you explain what you mean by "incremental AP
On 1 July 2010 19:16, Tom Doris wrote:
> According to the criterion.cabal file shipped with the latest (0.5.0.1)
> version of criterion, the Chart package is broken under GHC 6.12:
When Bryan last released Criterion, gtk2hs (and hence Chart) was
unbuildable on GHC 6.12 (which was what Bryan was u
On 02/07/2010 00:03, wren ng thornton wrote:
OS= OSX 10.5.8
GHC = 6.12.1
Cabal-Install = 0.8.2
Cabal = 1.8.0.2
$> cabal install criterion -fChart --reinstall
Resolving dependencies...
...
Configuring cairo-0.11.0...
setup: gtk2hsC2hs is required but it coul
Neil Brown wrote:
On 01/07/10 10:19, Tom Doris wrote:
According to the criterion.cabal file shipped with the latest
(0.5.0.1) version of criterion, the Chart package is broken under GHC
6.12:
flag Chart
description: enable use of the Chart package
-- Broken under GHC 6.12 so far
Does any
Andrew Coppin wrote:
I did wonder what the heck a "type function" is or why you'd want one.
And then a while later I wrote some code along the lines of
class Collection c where
type Element c :: *
empty :: c -> Bool
first :: c -> Element c
So now it's like Element is a function that
Andrew Coppin wrote:
wren ng thornton wrote:
Andrew Coppin wrote:
It's a bit like trying to learn Prolog from somebody who thinks that
the difference between first-order and second-order logic is somehow
"common knowledge". (FWIW, I have absolutely no clue what that
difference is.
First-ord
On Thu, Jul 1, 2010 at 1:54 PM, Sergey Mironov wrote:
> Hello list!
> I am trying to understand zipper concept using papers like [1] and [2].
> Though main idea looks clear, I still have a problem in applying it for
> custom data types.
>
> Please help me with deriving Zipper-type from
>
>> data D
Am 01.07.2010 um 21:56 schrieb Mrwibbly:
>
> I'm having real trouble starting this project. Basically I have to create a
> record store that store information about artists and albums and also the
> number of sales that they have had. It also needs to generate a list of the
> top 5 sellers.
>
>
On Thu, Jul 1, 2010 at 6:50 PM, Don Stewart wrote:
> I think we need to standardise the presentation of this data, and
> provide a lib to access it.
This, together with reverse dependencies[1], would be a nice feature
for the upcoming hackage-server.
Regards,
Bas
[1]
http://bifunctor.homelinu
Firstly, do you mean "recordSale sales anArtist anAlbum" ?
First off consider a datatype to model albums - something like:
type Name = String
type Artist = String
type Sold = Int
data Album = Album Name Sold
And consider storing then in a hash [1] where the artist name is the
key and [Album] is t
I was wondering how given a Type I can get a pretty printed type out of it.
I'm currently using showSDocUnqual . pprType . snd . tidyOpenType
emptyTidyEnv
But this has the problem that predicates don't get printed, anyone know how
GHCi does this?
Thanks,
Phyx
___
Simon Peyton-Jones wrote:
> I'm interested in situations where you think fundeps work and type
> families don't. Reason: no one knows how to make fundeps work cleanly
> with local type constraints (such as GADTs).
>
> If you think you have such as case, do send me a test case.
As an example,
I'm having real trouble starting this project. Basically I have to create a
record store that store information about artists and albums and also the
number of sales that they have had. It also needs to generate a list of the
top 5 sellers.
So far I have: recordSale :: Sales -> String -> String -
Hello list!
I am trying to understand zipper concept using papers like [1] and [2].
Though main idea looks clear, I still have a problem in applying it for
custom data types.
Please help me with deriving Zipper-type from
> data DTree a = P | D [(a, DTree)]
Looking in [1] ('Zippers via Differenti
On Thu, Jul 1, 2010 at 2:26 PM, Christopher Lane Hinson <
l...@downstairspeople.org> wrote:
> class (Path p, CompletePath (CompletedPath p)) => IncompletePath p where
>> type CompletedPath p :: *
>>
>
> AIUI, this isn't implemented yet. You'll have to place the constraint on
> each
> involved fun
On Thu, Jul 1, 2010 at 7:54 PM, Simon Peyton-Jones wrote:
>
> | Also, what is the difference between fundeps and type families
> | wrt local type constraints? I had always assumed them to be
> | equivalent, if fully implemented. Similar to logic vs functional
> | programming, where Haskellers
On Thu, Jul 1, 2010 at 2:35 PM, Christopher Lane Hinson
wrote:
> On Thu, 1 Jul 2010, Christopher Lane Hinson wrote:
>
>>
>>> Something like this should work:
>>>
>>> class (Path p, CompletePath (CompletedPath p)) => IncompletePath p where
>>> type CompletedPath p :: *
>>>
>>
>> AIUI, this isn't
GADTs?
data CompletePathEv p where CompletePathEv :: CompletePath p =>
CompletePathEv p
class Path p => IncompletePath p where
type CompletedPath p :: *
completedPathEv :: CompletePathEv (CompletedPath p)
Later you can pattern-match on completedPathEv and get your
CompletePath inst
On Thu, 1 Jul 2010, Christopher Lane Hinson wrote:
Something like this should work:
class (Path p, CompletePath (CompletedPath p)) => IncompletePath p where
type CompletedPath p :: *
AIUI, this isn't implemented yet. You'll have to place the constraint on
each
involved function.
Fri
Something like this should work:
class (Path p, CompletePath (CompletedPath p)) => IncompletePath p where
type CompletedPath p :: *
AIUI, this isn't implemented yet. You'll have to place the constraint on each
involved function.
Friendly,
--Lane
_
David Menendez wrote:
Something like this should work:
class (Path p, CompletePath (CompletedPath p)) => IncompletePath p where
type CompletedPath p :: *
Oh, you can do that? (I.e., mention the CompletedPath function before
you've defined it.) Sweet...
___
On Thu, Jul 1, 2010 at 2:09 PM, Andrew Coppin
wrote:
> Consider the following:
>
> class Path p where ...
>
> class Path p => CompletePath p where ...
>
> class Path p => IncompletePath p where
> type CompletedPath p :: *
>
> Obviously, the idea is that CompletedPath Foo (where Foo is an
> In
Consider the following:
class Path p where ...
class Path p => CompletePath p where ...
class Path p => IncompletePath p where
type CompletedPath p :: *
Obviously, the idea is that CompletedPath Foo (where Foo is an
IncompletePath) should yield some type which is a CompletePath. However
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 7/1/10 13:41 , aditya siram wrote:
> I'm picturing a non-Haskell developer getting thrown into the deep
> end. Now that I think about it I think that's part of why companies
> choose Java/C# etc. - they can just let Google train their people.
...an
| Well, from looking at the documentation, it looks like I could maybe
| use a type family if I could write:
|
| class (DerivedOf a ~ derived) => Typecheck a derived where
| ...
That's the right idiom yes. But see my message of a few minutes ago... It's
neater still to remove the 'derived
I don't know an algorithm that can always infer the most general types in
situations like this. In your example, if you give a signature for the simple
function (f :: Y Maybe -> Int), and use RelaxedPolyRec, then GHC will happily
infer the type you want for g. For RelaxedPolyRec to work its m
Claus
| > I'm interested in situations where you think fundeps work
| > and type families don't. Reason: no one knows how to make
| > fundeps work cleanly with local type constraints (such as GADTs).
| >
| > If you think you have such as case, do send me a test case.
|
| Do you have a wik
| Here's a concrete case I recently ran into:
|
| type family SomeOtherTypeFamily a
| class SomeClass a where type SomeType a
| instance a ~ SomeOtherTypeFamily b => SomeClass a where
|type SomeType a = (b,Int)
|-- (error) Not in scope: type variable `b'
|
| The same thing
Right, but I assume you have local experts who are willing to teach on
site. In most companies I've worked for there is minimal training.
Haskell really needs someone who can patiently walk alongside.
I'm picturing a non-Haskell developer getting thrown into the deep
end. Now that I think about it
That's not really true. We train people at Galois in Haskell, on the job.
Often they have prior FP experience, but not always.
aditya.siram:
> > And learning (fun) should be an important aspect of the position.
> Whatever FP you're coming from, I don't think you can pick up Haskell
> on the job. H
> And learning (fun) should be an important aspect of the position.
Whatever FP you're coming from, I don't think you can pick up Haskell
on the job. Haskell seems to require you to disappear into a cave for
a while, then again I haven't had the pleasure of working with
experienced Haskell programm
It depends on the type of a position.
If it is a "one-shot"/contract job then you are looking for the concrete
skillset/expertise, i.e. "Haskell".
For relatively longterm or permanent positions I think it is better to give
a priority to smart and "getting things done" type of persons rather than
s
That sounds like an excellent idea! If you would like some help, let me
know and I would be glad to :)
Cheers,
- Tim
On Thu, Jul 1, 2010 at 11:50 AM, Don Stewart wrote:
> I think we need to standardise the presentation of this data, and
> provide a lib to access it. I'll think some more abou
I think we need to standardise the presentation of this data, and
provide a lib to access it. I'll think some more about it. Should be
possible to automate it all now (that's mostly done), publish in a known
location, and provide an API for queries.
inforichland:
> If anyone wants to see the popu
On 2010-06-30 18:38, Chris BROWN wrote:
My question is:
Is it possible to allow the emacs/vim scripts that I have know where
this directory is automatically?
Maybe you could adapt the approach taken by Agda. Agda's Emacs mode is
installed using Cabal plus a small script:
1) The Emacs Lisp sour
On 01/07/10 13:11, Patrick Browne wrote:
Neil,
Does the following sum up the situation?
The class Num has subclasses containing various numeric types and the
literal 1 is a value for one or more of those types.
Hence the Haskell compiler says the instance 1) is OK.
But at run time, without the qu
The class Num has subclasses containing various numeric types and the
literal 1 is a value for one or more of those types.
Well, the problem is not with subclasses, but with types.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haske
Patrick Browne writes:
> Why do some cases such as 1) fail to run even if they are the only
> instantiation.
I think this is because literal numbers are polymorphic, i.e. a '1' in
your source code is shorthand for 'fromIntegral 1', which is a type of
Num a => a. Thus, 'spatialLocation 1' doesn'
Neil,
Does the following sum up the situation?
The class Num has subclasses containing various numeric types and the
literal 1 is a value for one or more of those types.
Hence the Haskell compiler says the instance 1) is OK.
But at run time, without the quantified (1:Int), the 1 could of more
than
On 01/07/10 12:37, Patrick Browne wrote:
Why do some cases such as 1) fail to run even if they are the only
instantiation.
-- 1) Compiles but does not run
instance LocatedAt Int String where
spatialLocation(1)="home"
That instance is fine. I presume the problem is that you are trying
Hi,
My understanding of functional dependencies is that they can be used to
ensure that one type depends on another type.
For example, the type of location depends could on the type of the
object at that location.
Consider two models
1) The location of an aircraft landing should have location of th
On 01/07/10 10:19, Tom Doris wrote:
According to the criterion.cabal file shipped with the latest
(0.5.0.1) version of criterion, the Chart package is broken under GHC
6.12:
flag Chart
description: enable use of the Chart package
-- Broken under GHC 6.12 so far
Does anyone know the status
According to the criterion.cabal file shipped with the latest (0.5.0.1)
version of criterion, the Chart package is broken under GHC 6.12:
flag Chart
description: enable use of the Chart package
-- Broken under GHC 6.12 so far
Does anyone know the status of this problem? It's been a little
According to the criterion.cabal file shipped with the latest (0.5.0.1)
version of criterion, the Chart package is broken under GHC 6.12:
flag Chart
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-ca
Hi Haskell-cafe,
I'ld like to announce the existence of hs-cryptohash [1] which provides
most common digests (sha1, sha2 family, md[245], ripemd160) in a incremental
and one-pass api.
It's also much faster than pure haskell implementation i've played with, since
the underlaying algorithms are all
50 matches
Mail list logo