Hi,
AntC's f can be done without -XOverlappingInstances
http://lpaste.net/7559485273839501312, using the trick didn't work in
#9918. I'm not sure extra syntax is justified to clean up this rare case.
Regards,
Adam
On Sun, Jun 7, 2015 at 11:12 AM, Dan Doel dan.d...@gmail.com wrote:
It
On Jun 2, 2015 6:03 PM, Wolfgang Jeltsch g9ks1...@acme.softbase.org
wrote:
Hi,
bug #10009 appears on the status page with status “new”, although the
bug should have been fixed in HEAD. Can this fix *please* be a part of
GHC 7.10.2? At the moment, this bug breaks the incremental-computing
Hi Wolfgang,
https://ghc.haskell.org/trac/ghc/ticket/10009 might be the same regression
(fixed in HEAD)
Regards,
Adam
On Tue, Jun 2, 2015 at 12:28 PM, Wolfgang Jeltsch
g9ks1...@acme.softbase.org wrote:
Hi,
the following (contrived) code is accepted by GHC 7.8.3, but not 7.10.1:
{-#
Hi Sergei,
I think you should use {-# OVERLAPPABLE #-}: see the description here
https://ghc.haskell.org/trac/ghc/ticket/9242#comment:16 which is probably
in the manual somewhere too.
Regards,
Adam
On Thu, May 21, 2015 at 9:40 AM, Sergei Meshveliani mech...@botik.ru
wrote:
People,
I wrote
Hi Ben,
With ghc-7.8.4 I get a different error Empty record update of:
default_config when using a wildcard to update a record.
I think you can't use wildcards in record updates because it's harder
(for users and for ghc) to figure out which fields are involved when
you don't name a constructor.
Hello list,
The following file compiles with my plugin. It makes a data family
HList have role representational in a way that I believe is safe:
https://github.com/aavogt/HListPlugin/blob/master/ex/Coerce.hs#L19
I expect the highlighted line to be acceptable. However, it seems that
the plugin
What part of applicative-quoters is broken for you? 0.1.0.8 compiles
on ghc-7.8.4 here, and [ado| a - Just (); b - Just 2; (a,b) |]
evaluates to Just ((),2) as it should.
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
Hi Adam,
I've added a README which tries to explain things:
https://github.com/aavogt/HListPlugin
When I produce a wanted constraint from a wanted constraint, things
work as I wanted. Thanks for the suggestion!
Regards,
Adam
On Mon, Feb 16, 2015 at 4:36 AM, Adam Gundry a...@well-typed.com
Hello,
Using ghc-7.10 rc1, I am trying to write a type checker plugin that
adds wanted constraint which helps ghc to infer more types. However,
it seems that the wanted constraints I add don't get added to the
inferred type of the declaration, so that I get a type error like:
a.hs:1:1: Warning:
On Tue, Feb 10, 2015 at 6:38 AM, Jan Stolarek jan.stola...@p.lodz.pl wrote:
I don't know how realistic this is but a constraint (HLength x ~
HLength y) would ideally have the same result as SameLength x y.
I'm not sure if I understand that part. HLength is not injective. How would
injectivity
Hi Jan,
One example is https://github.com/haskell/vector/issues/34
I see lots of potential uses in HList. For example in HZip.hs there's
a Zip using type families:
type family HZipR (x::[*]) (y::[*]) :: [*]
type instance HZipR '[] '[] = '[]
type instance HZipR (x ': xs) (y ': ys) = (x,y) ':
Hi Greg,
Perhaps a less-invasive way to implement the -XSafe part of your
proposal would be to provide a module like:
module Language.Haskell.TH.Safe (
module Language.Haskell.TH,
reifyWithoutNameG,
) where
import Language.Haskell.TH hiding (runIO, reify*)
where reifyWithoutNameG is the
I've added it as https://ghc.haskell.org/trac/ghc/ticket/10009
On Tue, Jan 20, 2015 at 11:23 AM, Richard Eisenberg e...@cis.upenn.edu wrote:
After quite a bit of thought, I agree that this is a regression and that the
original program should be accepted.
Make a bug report!
Thanks,
Richard
Hello List,
With ghc - 7.8 and 7.6 the following program is accepted:
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
class (UnF (F a) ~ a, Show a) = C a where
type F a
f :: F a - a
type family UnF a
g :: forall a. C a = a - String
g _ = show a
where a = f
Hi Volker,
You can use this extension:
http://www.haskell.org/ghc/docs/latest/html/users_guide/deriving.html#stand-alone-deriving
to write that orphan Typeable instance for most ghcs (probably 6.10 is
the earliest).
It might be worth pushing for a Typeable instance to be added to the
unix
Zeroth takes the first approach. It only supports a subset of TH
(DecsQ splices) however.
http://hackage.haskell.org/package/zeroth
https://github.com/aavogt/zeroth is a fork that works with more recent
haskell-src-exts and ghc
On Sat, Jul 5, 2014 at 3:59 PM, John Meacham j...@repetae.net
Hello List,
Given the following definitions:
class HEq (x :: k) (y :: k) (b :: Bool) | x y - b
instance ((Proxy x == Proxy y) ~ b) = HEq x y b -- (A)
instance ((x == y) ~ b) = HEq x y b -- (B)
The instance (A) lets HList compile, which can be reproduced with:
darcs get
] GHC generally obeys this rule
]
] · If GHC infers a type f::type, then it’s OK for you to add a type
] signature saying exactly that.
That rule suggests that -XScopedTypeVariables should be on by default,
and that you shouldn't need a forall to bring the type variables into
scope. I
http://www.haskell.org/ghc/docs/7.8.1-rc2/html/users_guide/syntax-extns.html#explicit-namespaces
is the trick
On Sat, Mar 15, 2014 at 12:47 PM, Henning Thielemann
lemm...@henning-thielemann.de wrote:
I want to import Nat and type-level (=) from GHC.TypeLits:
import GHC.TypeLits (Nat, (=))
Hello Christian,
It seems new to me that $( ) is allowed in patterns. I would have used
lamE in something like:
[| $(varE v) = return . SM.concatMapM $(lamE [varP v] (buildRns f
(xs++[w]) ys))) |]
Regards,
Adam
___
Glasgow-haskell-users mailing list
Hi Merijn,
Let me suggest the Fail type family in
http://www.haskell.org/pipermail/haskell-cafe/2013-November/111549.html
--
Adam
On Tue, Jan 14, 2014 at 8:56 AM, Merijn Verstraaten
mer...@inconsistent.nl wrote:
I was trying to fix one of my closed type families examples for the new
syntax,
Hello,
I have code:
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses,
ScopedTypeVariables, TypeFamilies #-}
class C a b where c :: a - b
instance (int ~ Integer) = C Integer int where c = (+1)
c2 :: forall a b c. (C a b, C b c) = a - c
c2 x = c (c x :: b)
c2 x = c ((c :: a - b) x)
Why
Hi Paolino,
There are some functions similar to that in HList (Data.HList.HArray).
Check the repo http://code.haskell.org/HList for a version that uses
more type families / gadts.
Maybe there is a way to take advantage of the fact that you've
labelled the elements of the list, but extract isn't
Hi Luke,
It seems like you missed this module:
http://hackage.haskell.org/package/QuickCheck-2.6/docs/Test-QuickCheck-Gen.html
Adam
On Mon, Oct 7, 2013 at 7:21 PM, Luke Evans l...@eversosoft.com wrote:
I was hoping I could use Arbitrary instances to generate streams of values
for test data.
On Sun, Oct 6, 2013 at 6:54 PM, Tillmann Rendel
ren...@informatik.uni-marburg.de wrote:
Hi,
Ryan Newton wrote:
It is very hard for me to
see why people should be able to make their own Generic instances (that
might lie about the structure of the type), in Safe-Haskell.
I guess that
On Sat, Sep 28, 2013 at 1:09 PM, Ryan Newton rrnew...@gmail.com wrote:
Hi all,
We all know and love Data.Foldable and are familiar with left folds and
right folds. But what you want in a parallel program is a balanced fold
over a tree. Fortunately, many of our datatypes (Sets, Maps)
On Sun, Sep 22, 2013 at 11:07 AM, TP paratribulati...@free.fr wrote:
My misunderstanding came from a confusion between a context and a
constraint. The context is what is before the =, and the constraint is
what is after, i.e. the main part of the instance declaration.
Hi TP,
I think context
Hi TP,
You can add another instance to cover the case that everything is zero.
Then you don't need the :. Also it's convenient to arrange for the
a,b,c to be the argument to Tensor, as given below:
class Multiplication a b c | a b - c where
(*) :: Tensor a - Tensor b - Tensor c
instance
Hi Jose and Richard,
haskell-src-meta has Language.Haskell.Meta.Utils.normalizeT which can
help with making code treat the two constructs equivalently, though
I imagine using th-desugar instead will make that process harder to
mess up.
Adam
On Thu, Aug 29, 2013 at 10:13 AM, Richard Eisenberg
On Sat, Aug 24, 2013 at 11:00 AM, TP paratribulati...@free.fr wrote:
that has type Stmt, in an ExpQ that seems to be the only thing that we can
put in a splice. I have found that it can only be done by doE (or DoE) and
compE (or CompE) according to
On Tue, Aug 20, 2013 at 5:00 PM, David Fox d...@seereason.com wrote:
This file gives me the error Cycle in type synonym declarations Can
anyone tell me why? I'm just trying to write a function to create a
type that is a FooT with the type parameter fixed.
{-# LANGUAGE TemplateHaskell #-}
On Mon, Aug 19, 2013 at 5:40 AM, AntC anthony_clay...@clear.net.nz wrote:
...
Would double-parens be too wild an idea?:
... ((CustId 47)) `extend` (CustName Fred, Gender Male)
f ((CustId x)) = ...
instance C ((CustId Int)) ...
We'd have to avoid the double parens as in:
on the R side
back to haskell.
Regards,
Adam Vogt
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Sat, Jul 20, 2013 at 12:31 AM, Carter Schonwald
carter.schonw...@gmail.com wrote:
the tricky part then is to add support for other types.
another approach to existentially package type classes with the data type!
eg
data HasEq = forall a . HasEq ( Eq a = a)
or its siblinng
data HasEq a
On Sat, Jul 20, 2013 at 12:14 AM, Michael Orlitzky mich...@orlitzky.com wrote:
For posterity, I report failure =)
Hi Michael,
It's fairly straightforward to generate the new data with template
haskell [1], and on the same page, section 10.7 'generic' zipWith is
likely to be similar to your
On Fri, Jul 19, 2013 at 5:19 AM, Jose A. Lopes jabolo...@google.com wrote:
Hello,
How to define equality for Data.Dynamic ?
Hi Jose,
You could try casting the values to different types that do have an
(==). You can treat the case where you have the types matching, but
didn't list that type
On Wed, Jul 3, 2013 at 2:25 AM, Magicloud Magiclouds
magicloud.magiclo...@gmail.com wrote:
Then I got
Illegal variable name: `UserPassword'
When splicing a TH declaration:
Hi Magicloud,
GHC seems to be trying to tell you that variables are lowercase in
haskell. Since you don't have code,
On Mon, Jul 1, 2013 at 5:42 PM, TP paratribulati...@free.fr wrote:
So what is the difference between lift and [||]?
Although I feel stupid, I cannot lie and claim I have understood.
Hi TP,
Sometimes [| |] does need to call lift. If for some reason the
original lift wasn't exported, you could
On Sun, Jun 2, 2013 at 10:19 PM, Ting Lei tin...@gmail.com wrote:
Thanks for your answers so far.
It seems that the laziness of String or [char] is the problem.
My question boils then down to this. There are plenty of Haskell FFI
examples where simple things like sin/cos in math.h can be
On Thu, May 30, 2013 at 8:17 PM, Frerich Raabe ra...@froglogic.com wrote:
Hi,
I'm considering to convert one of my projects to Shake; everything I've seen
so far seemed really interesting!
However, before I start, I'd like to see how other people structure their
Shake-based build systems.
Hi Aleksandar,
This library for extensible records does use -XDataKinds:
http://hackage.haskell.org/package/vinyl. It doesn't have as many
definitions as HList, but that might be because more recent extensions
are more powerful. Many other libraries are listed
Cheers,
Adam Vogt
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Fri, Feb 22, 2013 at 12:44 PM, Corentin Dupont
corentin.dup...@gmail.com wrote:
Hi all,
I have a program able to read another program as a string, and interpret it
(using Hint).
I'd like to make unit tests, so I have a file Test.hs containing a serie
of test programs as strings.
However,
On Sun, Dec 30, 2012 at 10:00 PM, Brandon Allbery allber...@gmail.com wrote:
On Sun, Dec 30, 2012 at 8:42 PM, Dan Burton danburton.em...@gmail.com
wrote:
[featureX] is usually too powerful, it surely would be abused
extensively, which would make developer's life a nightmare, unless there is
a = LongDec a Int a a a Char
Regards,
Adam Vogt
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Sat, Dec 15, 2012 at 9:24 AM, satvik chauhan mystic.sat...@gmail.com wrote:
Yeah, that is the problem. I have a function inside which I need to generate
some declarations using TH. I can not generate these at the top level as
these generations depend on the function's parameters which are
On Mon, Dec 10, 2012 at 7:23 PM, Takayuki Muranushi muranu...@gmail.com wrote:
Repeated thanks to you, Adam! Your code is brilliantly simple.
Sadly, I cannot reproduce the behaviors in your comments on my ghci
(7.6.1) .
Can we guess why? The version of packages we are using?
Mines are
On Sat, Dec 8, 2012 at 10:27 AM, Takayuki Muranushi muranu...@gmail.com wrote:
Continued discussion from
https://groups.google.com/d/topic/haskell-cafe/-e-xaCEbd-w/discussion
https://groups.google.com/d/topic/haskell-cafe/kM_-NvXAcx8/discussion
Thank you for all the answeres and thinkings;
On Wed, Dec 5, 2012 at 12:12 AM, Takayuki Muranushi muranu...@gmail.com wrote:
Dear everyone,
I have a code
https://github.com/nushio3/practice/blob/master/instance-inference/zipf-11-1.hs
that produces a type-error when I remove a type signature.
On Sat, Nov 24, 2012 at 1:32 AM, Erik de Castro Lopo
mle...@mega-nerd.com wrote:
Hi all,
It seems the Quasiquotation page on HaskellWiki
http://www.haskell.org/haskellwiki/Quasiquotation
has fallen behind the actually Quasiquotation implementation that
is in ghc-7.4.2 and later.
On Thu, May 13, 2010 at 7:16 PM, HASHIMOTO, Yusaku nonow...@gmail.com wrote:
Sorry for spamming, what I wanted to write is I think `has' has better
interface than other record packages in types.
There are many libraries to write function takes an record has Foo
and Bar and returns something.
On Tue, May 4, 2010 at 12:18 PM, HASHIMOTO, Yusaku nonow...@gmail.com wrote:
This library is inspired by HList[2], and interfaces are stealed from
data-accessors[3]. And lenses[4], fclabels[5], and records[6] devote
themselves to similar purposes.
[2]: http://hackage.haskell.org/package/HList
* On Sunday, May 02 2010, Alexander Dunlap wrote:
Of course, there are situations where it is really awkward to not use
partial functions, basically because you *know* that an invariant is
satisfied and there is no sane course of action if it isn't. To take a
contrived example:
f ys = let xs =
* On Wednesday, April 14 2010, Jesper Louis Andersen wrote:
newtype Process a b c = Process (ReaderT a (StateT b IO) c)
deriving (Functor, Monad, MonadIO, MonadState b, MonadReader a)
Note that the automatic derivations of *MonadState b* and *MonadReader a* makes
GHC spit our some
This is most likely attributable to the use of different compilers.
I don't see how accepting such a variant can cause ambiguity, but I'm
not quite sure whether it is legal H98.
On 5/6/09, Magnus Therning mag...@therning.org wrote:
Brandon S. Allbery KF8NH wrote:
On May 6, 2009, at 12:18 ,
This seems to be in ghc for those reasons:
http://www.haskell.org/haskellwiki/Quasiquotation
* On Monday, March 02 2009, Andrew Hunter wrote:
Several times now I've had to define an EDSL for working with
(vaguely) numeric expressions. For stuff like 2*X+Y, this is easy,
looking pretty much
* On Monday, February 16 2009, Andrew Coppin wrote:
I do have one little question. Let me see if I can find the quote... Ah,
here we go:
The WrappedMonad and WrappedArrow constructors witness the fact that
any Monad and any Arrow can be made into an Applicative.
I don't really
* On Saturday, December 13 2008, Gianfranco Alongi wrote:
I have actually been thinking about a similar thing, but on the group
subject.
One can actually group things in many ways, such as groupBy (==) , so
that groupBy (==) [1,2,1,2] should give
[[1,1],[2,2]]. Of course other ideas are
* On Thursday, June 19 2008, Ketil Malde wrote:
As a side note, may I advise you to use another symbol, and leave the
poor dot alone? Overloading it as a module separator is bad enough.
If you have a keyboard that allows greater-than-ascii input, there are
plenty of options: « » ¡ £ ¥ ł € ® ª...
* On Monday, June 09 2008, Duncan Coutts wrote:
And - is there a way to make GHCi use aliased qualification? I find
my self typing detailed taxonomies all the time there.
The ghci syntax currently is:
:m Data.Set
wouldn't it be much nicer as:
import Data.Set
then we could have the obvious:
60 matches
Mail list logo